Skip to content

Instantly share code, notes, and snippets.

@leduchung
Created December 7, 2016 19:57
Show Gist options
  • Save leduchung/01767a912b73b94075b44916f38596e6 to your computer and use it in GitHub Desktop.
Save leduchung/01767a912b73b94075b44916f38596e6 to your computer and use it in GitHub Desktop.
function PWD {
tmp=${PWD%/*/*};
[ ${#tmp} -gt 0 -a "$tmp" != "$PWD" ] && echo ${PWD:${#tmp}+1} || echo $PWD;
}
export PS1="\[\033[01;33m\]\$(PWD)\[\033[0m\] \$ ";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment