Advertisement
TMP3K

fancy bash

Nov 15th, 2015
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.62 KB | None | 0 0
  1. # enable programmable completion features (you don't need to enable
  2. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  3. # sources /etc/bash.bashrc).
  4.  
  5. if ! shopt -oq posix; then
  6.   if [ -f /usr/share/bash-completion/bash_completion ]; then
  7.     . /usr/share/bash-completion/bash_completion
  8.   elif [ -f /etc/bash_completion ]; then
  9.     . /etc/bash_completion
  10.   fi
  11. fi
  12.  
  13. function nonzero_return() {
  14.         RETVAL=$?
  15.         [ $RETVAL -ne 0 ] && echo "$RETVAL"
  16. }
  17.  
  18. export PS1="[\[\e[35m\]\`nonzero_return\`\[\e[m\]][\[\e[34m\]\A\[\e[m\]] \[\e[36m\]\u\[\e[m\]:\[\e[32m\]\w\[\e[m\]\[\e[37m\]\\$\[\e[m\] "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement