X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=rc%2Ffunctions;h=88a4ba09e4d23e3565242fb4e37532f56c406540;hb=c7fc0ce408c29c87654ece243684c215a56a4d0d;hp=6b42f0944894ce8048d9b250676ad28698ca9bfd;hpb=d1175dc844381938dc784187c60375c11ecf2631;p=clearscm.git diff --git a/rc/functions b/rc/functions index 6b42f09..88a4ba0 100644 --- a/rc/functions +++ b/rc/functions @@ -23,9 +23,8 @@ function title_bar { ROOT=shift ROOT="${NORMAL}\($ROOT\)" fi - + prefix="$@" - # Change $HOME -> ~ if [ "${PWD#$HOME*}" != "$PWD" ]; then current_dir="~${PWD#$HOME*}" @@ -58,9 +57,11 @@ function title_bar { "$TERM" = "vt221" ]; then string=$(echo "${SYSNAME##*:}:$@") echo -n "${ESC}]2;$string\007" - elif [ "$TERM" = "cygwin" -o "$TERM" = "vt100" -o "$TERM" = "xterm" ]; then - # Here's where we set the prompt with root - PS1="\[\e]0;$prefix$current_dir\a$AQUA\]$ROOT\[$YELLOW\]$SYSNAME:\[$NORMAL\]" + elif [ "$TERM" = "cygwin" -o \ + "$TERM" = "vt100" -o \ + "$TERM" = "xterm" -o \ + "$TERM" = "xterm-256color" ]; then + PS1="\[\e]0;$prefix$current_dir\007\]\[$RED\]$ROOT\[$LIGHT_CYAN\]$SYSNAME:\[$WHITE\]" fi } # title_bar @@ -103,7 +104,7 @@ function set_title { view_name="" title_bar "$ROOT" else - title_bar "$ROOT" "View: $view_name: " + title_bar "${ROOT}View: $view_name: " fi icon_name "${SYSNAME##*:}" @@ -118,17 +119,19 @@ function set_prompt { "$TERM" = "dtterm" -o \ ! -z "$DTTERM" ]; then ROOT="${RED}Wizard$NORMAL " - elif [ "$TERM" = "vt100" -o \ - "$TERM" = "xterm" -o \ - "$TERM" = "vt220" ]; then + elif [ "$TERM" = "vt100" -o \ + "$TERM" = "xterm" -o \ + "$TERM" = "xterm-256color" -o \ + "$TERM" = "vt220" ]; then ROOT="${BOLD}${BLINK}Wizard$NORMAL " fi else ROOT="" fi - if [ "$TERM" = "vt100" -o \ - "$TERM" = "xterm" -o \ + if [ "$TERM" = "vt100" -o \ + "$TERM" = "xterm" -o \ + "$TERM" = "xterm-256color" -o \ "$TERM" = "vt220" ]; then PS1="$ROOT$BOLD$SYSNAME:$NORMAL" else