commit 46a822ea43aa897e1c68a5c66c387f39ca40cb54 parent 60f2e2e05a44cdd411ccf1e997fcef5b0abf0540 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Wed, 28 Aug 2019 12:03:02 +0200 Auto-update zsh prompt Diffstat:
M | .zshrc | | | 7 | +++++-- |
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.zshrc b/.zshrc @@ -199,8 +199,11 @@ rprompt() { [ "$HOST" != "idkfa" ] && echo -n "%m" || : } -PROMPT="$(prompt_with_vimode $insert_mode)" -RPROMPT="$(rprompt)" +set_prompt() { + PROMPT="$(prompt_with_vimode $insert_mode)" + RPROMPT="$(rprompt)" +} +add-zsh-hook precmd set_prompt function zle-keymap-select { if [[ ${KEYMAP} == vicmd ]] || [[ $1 = 'block' ]]; then