mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-05 16:48:38 +00:00
some ksh do not get a $USER, only a $LOGNAME. Make them happy.
This commit is contained in:
parent
f19b125086
commit
256a3daad2
1 changed files with 5 additions and 2 deletions
|
@ -1,9 +1,12 @@
|
||||||
if [ $USER = root ] ; then
|
if [ ! $USER ] ; then
|
||||||
|
USER=$LOGNAME
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $USER ] && [ $USER = root ] ; then
|
||||||
BASE="#"
|
BASE="#"
|
||||||
else
|
else
|
||||||
BASE="$"
|
BASE="$"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
PS1=$'\E[01;32m'"${USER} "$'\E[01;34m''$PWD'" ${BASE} "$'\E[0m'
|
PS1=$'\E[01;32m'"${USER} "$'\E[01;34m''$PWD'" ${BASE} "$'\E[0m'
|
||||||
export PS1
|
export PS1
|
||||||
|
|
Loading…
Add table
Reference in a new issue