Skip to content

Instantly share code, notes, and snippets.

@jeremyboggs
Created November 8, 2016 16:29
Show Gist options
  • Save jeremyboggs/78d2449679f20d54340fb5ee113978b8 to your computer and use it in GitHub Desktop.
Save jeremyboggs/78d2449679f20d54340fb5ee113978b8 to your computer and use it in GitHub Desktop.
PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi'
PS1="[\$CurDir] "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment