# see also /usr/share/doc/bash-color-prompt/README.md # example colorings: # PROMPT_COLOR=0 # disable colors/attribs # PROMPT_COLOR=1 # bold prompt # PROMPT_COLOR=2 # dim prompt # PROMPT_COLOR=4 # underline prompt # PROMPT_COLOR='2;7' # dim reverse video # PROMPT_COLOR='42' # green background # PROMPT_COLOR='53' # overline separator # PROMPT_COLOR='1;33;44' # bold yellow on blue # PROMPT_COLOR='43;30' # black on yellow # PROMPT_COLOR='1;32' # bold green # PROMPT_COLOR='' # unset defaults to green # See for ANSI codes ## to truncate \w dirpath set: # PROMPT_DIRTRIM=3 # only set for color terminals and if PS1 unchanged from bash or fedora defaults if [ '(' "$PS1" = "[\u@\h \W]\\$ " -o "$PS1" = "\\s-\\v\\\$ " ')' -a "${TERM: -5}" = "color" -o -n "${prompt_color_force}" ]; then PS1='${PROMPT_BRACKETS:+[}\[\e[${PROMPT_COLOR:-32}m\]${container:+⬢ }\u@\h\[\e[0m\]:\[\e[${PROMPT_DIR_COLOR:-${PROMPT_COLOR:-32}}m\]\w${PROMPT_ERROR:+\[\e[0;31m\]${?#0}}\[\e[0m\]${PROMPT_BRACKETS:+]}\$ ' fi