From cd44832dc1ef95dfbe9437a11f22a9a7cdf58b64 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Mon, 20 Jul 2020 18:45:25 -0600 Subject: [PATCH] purs: show user when root --- pkgs/shells/zsh/purs/init.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/shells/zsh/purs/init.sh b/pkgs/shells/zsh/purs/init.sh index e1c5064c..8f9fbc1f 100644 --- a/pkgs/shells/zsh/purs/init.sh +++ b/pkgs/shells/zsh/purs/init.sh @@ -1,5 +1,9 @@ function zle-line-init zle-keymap-select { - PROMPT=`@PURS@/bin/purs prompt -us -k "$KEYMAP" -r "$?" --venv "${${VIRTUAL_ENV:t}%-*}"` + 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}%-*}"` + fi zle reset-prompt } zle -N zle-line-init