Advertising
- sample .bash_profile
- Wednesday, January 31st, 2007 at 12:26:59pm UTC
- # black :) \e[0;30m\]
- # red \e[0;31m\]
- # green \e[0;32m\]
- # yellow \e[0;33m\]
- # blue \e[0;34m\]
- # purple \e[0;35m\]
- # cyan \e[0;36m\]
- # grey \e[0;37m\]
- # white \e[0;38m\]
- # cancel \e[m\]
- TERMCOLOUR_RED="\[\033[0;31m\]"
- TERMCOLOUR_GREEN="\[\033[0;32m\]"
- TERMCOLOUR_YELLOW="\[\033[0;33m\]"
- TERMCOLOUR_BLUE="\[\033[0;34m\]"
- TERMCOLOUR_PURPLE="\[\033[0;35m\]"
- TERMCOLOUR_CYAN="\[\033[0;36m\]"
- TERMCOLOUR_GREY="\[\033[0;37m\]"
- TERMCOLOUR_BRRED="\[\033[1;31m\]"
- TERMCOLOUR_BRGREEN="\[\033[1;32m\]"
- TERMCOLOUR_BRYELLOW="\[\033[1;33m\]"
- TERMCOLOUR_BRBLUE="\[\033[1;34m\]"
- TERMCOLOUR_BRPURPLE="\[\033[1;35m\]"
- TERMCOLOUR_BRCYAN="\[\033[1;36m\]"
- TERMCOLOUR_BRGREY="\[\033[1;37m\]"
- TERMCOLOUR_CANCEL="\[\033[m\]"
- # If I am root, set the prompt to bright red
- if [ ${UID} -eq 0 ]; then
- USER_COLOR=$TERMCOLOUR_BRRED
- else
- USER_COLOR=$TERMCOLOUR_GREEN
- fi
- HOST_COLOR=$TERMCOLOUR_YELLOW
- PS1="$USER_COLOR"$'\u'"$TERMCOLOUR_CANCEL"$'@'"$HOST_COLOR"$'\h'"$TERMCOLOUR_CANCEL"$':\w\$ '
- PS2='>'
- unset TERMCOLOUR_RED TERMCOLOUR_GREEN TERMCOLOUR_YELLOW TERMCOLOUR_BLUE
- unset TERMCOLOUR_PURPLE TERMCOLOUR_CYAN TERMCOLOUR_GREY
- unset TERMCOLOUR_BRRED TERMCOLOUR_BRGREEN TERMCOLOUR_BRYELLOW TERMCOLOUR_BRBLUE
- unset TERMCOLOUR_BRPURPLE TERMCOLOUR_BRCYAN TERMCOLOUR_BRGREY
- unset TERMCOLOUR_CANCEL
- 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.
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.