Posted By

gdonald on 09/27/06


Tagged

bashrc


Versions (?)

Bash bashrc


 / Published in: Bash
 

  1. alias l='ls -GF'
  2. alias ll='ls -laGF'
  3. alias cp='cp -i'
  4. alias vi='/usr/bin/vim'
  5. alias vl='tail -f /var/log/messages|colorize'
  6. alias ..='cd ..'
  7. alias ...='cd ../..'
  8.  
  9. Black="\[\033[0;30m\]"
  10. DarkGray="\[\033[1;30m\]"
  11. LightGray="\[\033[0;37m\]"
  12. White="\[\033[1;37m\]"
  13. Blue="\[\033[0;34m\]"
  14. LightBlue="\[\033[1;34m\]"
  15. Green="\[\033[0;32m\]"
  16. LightGreen="\[\033[1;32m\]"
  17. Cyan="\[\033[0;36m\]"
  18. LightCyan="\[\033[1;36m\]"
  19. Red="\[\033[0;31m\]"
  20. LightRed="\[\033[1;31m\]"
  21. Purple="\[\033[0;35m\]"
  22. LightPurple="\[\033[1;35m\]"
  23. Brown="\[\033[0;33m\]"
  24. Yellow="\[\033[1;33m\]"
  25.  
  26. if [ `/usr/bin/whoami` = 'root' ]
  27. then
  28. # Do not set PS1 for dumb terminals
  29. if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
  30. then
  31. export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
  32. fi
  33. UColor=$Red
  34. else
  35. # Do not set PS1 for dumb terminals
  36. if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
  37. then
  38. export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
  39. fi
  40. UColor=$LightPurple
  41. fi
  42.  
  43. PS1="\n$Yellow-$LightCyan+$LightBlue($LightGreen\D{%D %r}$LightBlue)"
  44. PS1="$PS1\n$Yellow-$LightCyan+$LightBlue($UColor\u$LightCyan@$Purple\h$LightBlue)"
  45. PS1="$PS1\n$Yellow-$LightCyan+$LightBlue($Yellow\w$LightBlue)$DarkGray>$LightGray>>$White> "
  46. PS2="$DarkGray-$LightGray-$LightGray-$White "
  47.  
  48. EDITOR="/usr/bin/vim"
  49.  
  50. PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin"
  51.  
  52. export PS1 PS2 EDITOR PATH
  53.  
  54. umask 022

Report this snippet  

You need to login to post a comment.