Deathjam

colour-good/bad cmd

Dec 15th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.26 KB | None | 0 0
  1. PROMPT_COMMAND='PS1="\[\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\`]\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"'
Advertisement
Add Comment
Please, Sign In to add comment