mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-01 01:04:00 +00:00
fix(zsh): work when setopt ksh_arrays
is set (#1612)
This commit is contained in:
parent
2996220568
commit
6186e296ac
@ -46,10 +46,10 @@ starship_preexec() {
|
||||
|
||||
# If starship precmd/preexec functions are already hooked, don't double-hook them
|
||||
# to avoid unnecessary performance degradation in nested shells
|
||||
if [[ ${precmd_functions[(ie)starship_precmd]} -gt ${#precmd_functions} ]]; then
|
||||
if [[ -z ${precmd_functions[(re)starship_precmd]} ]]; then
|
||||
precmd_functions+=(starship_precmd)
|
||||
fi
|
||||
if [[ ${preexec_functions[(ie)starship_preexec]} -gt ${#preexec_functions} ]]; then
|
||||
if [[ -z ${preexec_function[(re)starship_preexec]} ]]; then
|
||||
preexec_functions+=(starship_preexec)
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user