Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

sample .bash_profile
Wednesday, January 31st, 2007 at 12:26:59pm UTC 

  1. # black :)      \e[0;30m\]
  2. # red           \e[0;31m\]
  3. # green         \e[0;32m\]
  4. # yellow        \e[0;33m\]
  5. # blue          \e[0;34m\]
  6. # purple        \e[0;35m\]
  7. # cyan          \e[0;36m\]
  8. # grey          \e[0;37m\]
  9. # white         \e[0;38m\]
  10. # cancel        \e[m\]
  11.  
  12. TERMCOLOUR_RED="\[\033[0;31m\]"
  13. TERMCOLOUR_GREEN="\[\033[0;32m\]"
  14. TERMCOLOUR_YELLOW="\[\033[0;33m\]"
  15. TERMCOLOUR_BLUE="\[\033[0;34m\]"
  16. TERMCOLOUR_PURPLE="\[\033[0;35m\]"
  17. TERMCOLOUR_CYAN="\[\033[0;36m\]"
  18. TERMCOLOUR_GREY="\[\033[0;37m\]"
  19.  
  20. TERMCOLOUR_BRRED="\[\033[1;31m\]"
  21. TERMCOLOUR_BRGREEN="\[\033[1;32m\]"
  22. TERMCOLOUR_BRYELLOW="\[\033[1;33m\]"
  23. TERMCOLOUR_BRBLUE="\[\033[1;34m\]"
  24. TERMCOLOUR_BRPURPLE="\[\033[1;35m\]"
  25. TERMCOLOUR_BRCYAN="\[\033[1;36m\]"
  26. TERMCOLOUR_BRGREY="\[\033[1;37m\]"
  27.  
  28. TERMCOLOUR_CANCEL="\[\033[m\]"
  29.  
  30. # If I am root, set the prompt to bright red
  31. if [ ${UID} -eq 0 ]; then
  32.         USER_COLOR=$TERMCOLOUR_BRRED
  33. else
  34.         USER_COLOR=$TERMCOLOUR_GREEN
  35. fi
  36.  
  37.  
  38. HOST_COLOR=$TERMCOLOUR_YELLOW
  39.  
  40. PS1="$USER_COLOR"$'\u'"$TERMCOLOUR_CANCEL"$'@'"$HOST_COLOR"$'\h'"$TERMCOLOUR_CANCEL"$':\w\$ '
  41.  
  42. PS2='>'
  43.  
  44. unset TERMCOLOUR_RED TERMCOLOUR_GREEN TERMCOLOUR_YELLOW TERMCOLOUR_BLUE
  45. unset TERMCOLOUR_PURPLE TERMCOLOUR_CYAN TERMCOLOUR_GREY
  46. unset TERMCOLOUR_BRRED TERMCOLOUR_BRGREEN TERMCOLOUR_BRYELLOW TERMCOLOUR_BRBLUE
  47. unset TERMCOLOUR_BRPURPLE TERMCOLOUR_BRCYAN TERMCOLOUR_BRGREY
  48. unset TERMCOLOUR_CANCEL
  49. unset USER_COLOR HOST_COLOR

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right