purs: show user when root
This commit is contained in:
parent
364a25a7f2
commit
cd44832dc1
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
||||||
function zle-line-init zle-keymap-select {
|
function zle-line-init zle-keymap-select {
|
||||||
|
if [[ $USER == root ]]; then
|
||||||
|
PROMPT=`@PURS@/bin/purs prompt -u -k "$KEYMAP" -r "$?" --venv "${${VIRTUAL_ENV:t}%-*}"`
|
||||||
|
else
|
||||||
PROMPT=`@PURS@/bin/purs prompt -us -k "$KEYMAP" -r "$?" --venv "${${VIRTUAL_ENV:t}%-*}"`
|
PROMPT=`@PURS@/bin/purs prompt -us -k "$KEYMAP" -r "$?" --venv "${${VIRTUAL_ENV:t}%-*}"`
|
||||||
|
fi
|
||||||
zle reset-prompt
|
zle reset-prompt
|
||||||
}
|
}
|
||||||
zle -N zle-line-init
|
zle -N zle-line-init
|
||||||
|
|
Loading…
Reference in a new issue