Merge branch 'master' of gitosis@majnematic.com:davesdots

This commit is contained in:
David Alexander Majnemer 2009-01-16 13:54:16 -06:00
commit 3159a2273a
3 changed files with 32 additions and 14 deletions

View file

@ -10,15 +10,21 @@ function do_prompt ()
else
BASE="#"
fi
local TITLEBAR
case $TERM in
xterm*)
xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*)
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
;;
screen*)
TITLEBAR='\[\033k\033\134\033k\u@\h:\w\033\134\]'
;;
*)
TITLEBAR=''
;;
esac
export PS1="${TITLEBAR}\[\033[01;32m\]\u@\h \[\033[01;34m\]\w ${ERROR_PROMPT}${BASE} \[\033[00m\]"
PS1="${TITLEBAR}\[\033[01;32m\]\u@\h \[\033[01;34m\]\w ${ERROR_PROMPT}${BASE} \[\033[00m\]"
export PS1
}
PROMPT_COMMAND=do_prompt

View file

@ -1,12 +0,0 @@
if [ -z "${USER}" ] ; then
USER=$LOGNAME
fi
if [ -n "${USER}" ] && [ ${USER} = root ] ; then
BASE="#"
else
BASE="$"
fi
PS1=$'\E[01;32m'"${USER} "$'\E[01;34m''$PWD'" ${BASE} "$'\E[0m'
export PS1

24
ksh/title_prompt Executable file
View file

@ -0,0 +1,24 @@
if [ -z "${USER}" ] ; then
USER=$LOGNAME
fi
if [ -n "${USER}" ] && [ ${USER} = root ] ; then
BASE="#"
else
BASE="$"
fi
case $TERM in
xterm*|*rxvt*|cygwin|interix|Eterm|mlterm|kterm|aterm|putty*)
TITLE=']0;${USER}:${PWD}'
;;
screen*)
TITLE='k\\k${USER}:${PWD}\\'
;;
*)
TITLE=''
;;
esac
PS1=$TITLE$'\E[01;32m'"${USER} "$'\E[01;34m''$PWD'" ${BASE} "$'\E[0m'
export PS1