mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-05 16:48:38 +00:00
move ksh's prompt to title_prompt as it now has support for this functionality
This commit is contained in:
parent
5633dbd71e
commit
6e6cb7a85c
2 changed files with 24 additions and 12 deletions
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