2019-12-15 04:37:46 +00:00
|
|
|
function zle-line-init zle-keymap-select {
|
2020-07-21 00:45:25 +00:00
|
|
|
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
|
2019-12-15 04:37:46 +00:00
|
|
|
zle reset-prompt
|
|
|
|
}
|
|
|
|
zle -N zle-line-init
|
|
|
|
zle -N zle-keymap-select
|
|
|
|
|
|
|
|
autoload -Uz add-zsh-hook
|
|
|
|
|
|
|
|
function _prompt_purs_precmd() {
|
|
|
|
@PURS@/bin/purs precmd
|
|
|
|
}
|
|
|
|
add-zsh-hook precmd _prompt_purs_precmd
|