fix: allow unset KEYMAP and STARSHIP_DURATION in zsh (#3124)
* allow unset KEYMAP and STARSHIP_DURATION in zsh which prevents errors if a user has `set -u` on in there terminal. * fix: allow unset KEYMAP and STARSHIP_DURATION in zsh
This commit is contained in:
parent
671365b505
commit
c20a998d15
|
@ -91,6 +91,7 @@ export STARSHIP_SESSION_KEY=${STARSHIP_SESSION_KEY:0:16}; # Trim to 16-digits if
|
|||
VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
|
||||
setopt promptsubst
|
||||
PROMPT='$(::STARSHIP:: prompt --terminal-width="$COLUMNS" --keymap="$KEYMAP" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="$STARSHIP_DURATION" --jobs="$STARSHIP_JOBS_COUNT")'
|
||||
RPROMPT='$(::STARSHIP:: prompt --right --terminal-width="$COLUMNS" --keymap="$KEYMAP" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="$STARSHIP_DURATION" --jobs="$STARSHIP_JOBS_COUNT")'
|
||||
|
||||
PROMPT='$(::STARSHIP:: prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
|
||||
RPROMPT='$(::STARSHIP:: prompt --right --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
|
||||
|
||||
|
|
Loading…
Reference in New Issue