mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-05 16:48:38 +00:00
Merge branch 'master' of gitosis@majnematic.com:davesdots
This commit is contained in:
commit
3159a2273a
3 changed files with 32 additions and 14 deletions
|
@ -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
|
||||
|
|
12
ksh/prompt
12
ksh/prompt
|
@ -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
24
ksh/title_prompt
Executable 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
|
Loading…
Add table
Reference in a new issue