Skip to content

Instantly share code, notes, and snippets.

@Coomer
Created December 10, 2017 16:06
Show Gist options
  • Save Coomer/8753a61d8ee5ccae7129257c1665f409 to your computer and use it in GitHub Desktop.
Save Coomer/8753a61d8ee5ccae7129257c1665f409 to your computer and use it in GitHub Desktop.
.bashrc_fun_colors
# Enable colored output for ls
export CLICOLOR=true
# First a basic colored prompt
export PS1='\[\033[0;32m\]\u@\h\[\033[0;36m\] \w\[\033[00m\]: '
# Then fancy colored prompts
function EXT_COLOR () { echo -ne "\[\033[38;5;$1m\]"; }
if [ "$TERM" = "xterm-256color" ]; then
# Normal windows get a green-yellow fade prompt
colors="`EXT_COLOR 118`ro"
colors+="`EXT_COLOR 154`ck"
colors+="`EXT_COLOR 190`et"
colors+="`EXT_COLOR 226`sh"
colors+="`EXT_COLOR 220`ip"
export PS1="\[\033[0;34m\]\u@"$colors"\[\033[0;36m\] \w\[\033[00m\]: "
fi
if [ "$TERM" = "screen" ]; then
# Screen gets the "lifesaver" prompt
colors="`EXT_COLOR 022`ro"
colors+="`EXT_COLOR 058`ck"
colors+="`EXT_COLOR 166`et"
colors+="`EXT_COLOR 130`sh"
colors+="`EXT_COLOR 133`ip"
export PS1="\[\033[0;34m\]\u@"$colors"\[\033[0;36m\] \w\[\033[00m\]: "
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment