#!/bin/bash if test "$UID" = 0 ; then _host="\h" _prompt="#" else _user="\u" _at="@" _host="\h" _prompt="$" if test \( "$TERM" = "xterm" -o "${TERM#screen}" != "$TERM" \) \ -a -z "$EMACS" -a -z "$MC_SID" -a -n "$DISPLAY" then _pwd="\$(ppwd \l)" fi fi if [ $TERM = "dumb" -o $TERM = "vt100" ]; then PS1="${_user}${_at}${_host}:${_pwd}${_prompt} " else _pwd="\W" _yellow="\[\033[33m\]" _cyan="\[\033[36m\]" _red="\[\033[31m\]" _green="\[\033[32m\]" _end="\[\033[37;40;0m\]" PS1="${_yellow}${_user}${_cyan}${_at}${_red}${_host} ${_green}${_pwd} ${_cyan}${_prompt}${_end} " fi