SHARE
TWEET

Bash prompt with primitive path shortening

a guest Mar 15th, 2017 297 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PS1='\[\e[2;37m\]\! \[\e[1;32m\]\u@\H\[\e[0m\] $(if [[ ${#PWD} -gt 30 ]]; then echo "${PWD:0:14}..${PWD:(-14)}"; else echo "${PWD}"; fi) $(if [[ $? != 0 ]]; then echo "\[\e[31m\]"; fi)$([ \j -gt 0 ] && echo "\[\e[2;37m\][\j]\[\e[0m\] ")\$\[\e[0m\] '
RAW Paste Data
Top