From 66c05bd87c93b736a0e08d9f3cd004d6bea45a41 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Thu, 18 Sep 2008 01:10:18 +0200 Subject: [PATCH] .bash/prompt.in: Cleaned --- .bash/prompt.in | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.bash/prompt.in b/.bash/prompt.in index 0fa6c73..8646848 100644 --- a/.bash/prompt.in +++ b/.bash/prompt.in @@ -1,4 +1,4 @@ -function eliteprompt() { +eliteprompt() { local NOCOLOR='\[\033[0m\]' local BLUE='\[\033[1;34m\]' local CYAN='\[\033[1;36m\]' @@ -9,7 +9,7 @@ function eliteprompt() { local TTY='$(TTY=`tty` && echo ${TTY:5})' local TITLEBAR= - case $TERM in + case "$TERM" in screen|screen-256color|putty|xterm*|rxvt) TITLEBAR='\[\033]0;\u@\h \w\007\]' ;; @@ -19,26 +19,15 @@ function eliteprompt() { ps1="$BLUE[$CYAN\\t$BLUE]" # user/host - ps1a=$NOCOLOR\\u$CYAN\@$NOCOLOR\\h + ps1a="$NOCOLOR\\u$CYAN@$NOCOLOR\\h" # workdir and tty - ps1=$ps1' '$BLUE\[$ps1a$CYAN\($NOCOLOR$TTY$CYAN\)$NOCOLOR\\W$BLUE\] + ps1="$ps1 $BLUE[$ps1a$CYAN($NOCOLOR$TTY$CYAN)$NOCOLOR\\W$BLUE]" # and the prompt - ps1=$ps1$CYAN\\$ - export PS1=$TITLEBAR$ps1$NOCOLOR' ' -} - -function dummyprompt() { - export PS1='[$( date +%H:%M )] [\u@\h:\w]\$ ' -} - -function ircprompt() { - export PS1='[$( date +%H:%M )] <$( if [ $UID -eq 0 ]; then echo "@"; fi )\u>' + export PS1="$TITLEBAR$ps1$CYAN\\\$$NOCOLOR " } eliteprompt unset eliteprompt -unset dummyprompt -unset ircprompt