Replace ppwd with inline sed expression

This commit is contained in:
2018-07-03 20:47:23 +01:00
parent 84e632aa1d
commit d2a9a24f49
3 changed files with 1 additions and 21 deletions

View File

@ -1,6 +1,6 @@
export PAGER='/usr/bin/less -R'
export EDITOR='/usr/bin/vi'
export PS1='\e[1;36m\u@\h\e[0m \e[0;32m$(ppwd)\e[0m> '
export PS1='\e[1;36m\u@\h\e[0m \e[0;32m$(pwd | sed -E '"'s|^'\$HOME'|~|;s|(.*)/|\\1%#|;s|((^\\|/)\\.?[^/%]{1})[^/%]*|\\1|g;s|(.*)%#|\\1/|')"'\e[0m> '
# Source configuration files from /etc/profile.d
for i in /etc/profile.d/*.sh ; do