Skip to content

Instantly share code, notes, and snippets.

@subhodi
Created February 19, 2019 12:19
Show Gist options
  • Save subhodi/58f3a4986704af225f218b9d06614139 to your computer and use it in GitHub Desktop.
Save subhodi/58f3a4986704af225f218b9d06614139 to your computer and use it in GitHub Desktop.
Shorten-the-current-directory-path-shown-on-terminal
if [ "$color_prompt" = yes ]; then
# PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '
else
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
PS1='\u@\h: \W:\$'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment