mirror of
https://github.com/starship/starship.git
synced 2024-11-07 08:54:50 +01:00
fix(zsh): Fix zsh init when starship is in a directory with spaces.
::STARSHIP:: is already properly quoted in init/mod.rs, so this seems to work nicely. Fixes #6333
This commit is contained in:
parent
4ecd327fb1
commit
9ed16ab22d
@ -41,6 +41,7 @@ prompt_starship_precmd() {
|
||||
unset STARSHIP_DURATION STARSHIP_CMD_STATUS STARSHIP_PIPE_STATUS
|
||||
fi
|
||||
|
||||
STARSHIP_PATH=::STARSHIP::
|
||||
# Use length of jobstates array as number of jobs. Expansion fails inside
|
||||
# quotes so we set it here and then use the value later on.
|
||||
STARSHIP_JOBS_COUNT=${#jobstates}
|
||||
@ -87,6 +88,6 @@ 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_PATH prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
|
||||
RPROMPT='$($STARSHIP_PATH prompt --right --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
|
||||
PROMPT2="$(::STARSHIP:: prompt --continuation)"
|
||||
|
Loading…
Reference in New Issue
Block a user