Evaluate $PROMPT at render time (#274)

This allows $PURE_PROMPT_SYMBOL to be modified at any point.
This commit is contained in:
Mathias Fredriksson
2017-01-18 18:29:19 +02:00
committed by Sindre Sorhus
parent 6ec0029ac5
commit 3dd645970e

View File

@@ -368,7 +368,7 @@ prompt_pure_setup() {
[[ $UID -eq 0 ]] && prompt_pure_username=' %F{white}%n%f%F{242}@%m%f'
# prompt turns red if the previous command didn't exit with 0
PROMPT="%(?.%F{magenta}.%F{red})${PURE_PROMPT_SYMBOL:-}%f "
PROMPT='%(?.%F{magenta}.%F{red})${PURE_PROMPT_SYMBOL:-}%f '
}
prompt_pure_setup "$@"