tamir_bashrc 450 B

12345678910111213141516171819202122232425
  1. cat > /etc/bashrc << "EOF"
  2. alias ls='ls --color=auto'
  3. NORMAL="\[\e[0m\]"
  4. RED="\[\e[1;31m\]"
  5. GREEN="\[\e[1;32m\]"
  6. WHITE="\[\e[1;37m\]"
  7. case $TERM in
  8. xterm|rxvt*)
  9. TITLEBAR='\[\033]0;\u@\h \007\]'
  10. ;;
  11. *)
  12. TITLEBAR=''
  13. ;;
  14. esac
  15. if [[ $EUID == 0 ]] ; then
  16. PS1="$TITLEBAR$RED\u [ $NORMAL\w$RED ]# $NORMAL"
  17. else
  18. PS1="$TITLEBAR$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
  19. fi
  20. EOF