Advertisement
Guest User

Untitled

a guest
Jan 7th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.80 KB | None | 0 0
  1. force_color_prompt=yes
  2.  
  3. if [ -n "$force_color_prompt" ]; then
  4.     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  5.   # We have color support; assume it's compliant with Ecma-48
  6.   # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
  7.   # a case would tend to support setf rather than setaf.)
  8.   color_prompt=yes
  9.     else
  10.   color_prompt=
  11.     fi
  12. fi
  13.  
  14. if [ "$color_prompt" = yes ]; then
  15.     PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] '
  16. else
  17.     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  18. fi
  19. unset color_prompt force_color_prompt
  20.  
  21. # If this is an xterm set the title to user@host:dir
  22. case "$TERM" in
  23. xterm*|rxvt*)
  24.     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  25.     ;;
  26. *)
  27.     ;;
  28. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement