diff options
author | David Knaack <davidkna@users.noreply.github.com> | 2020-09-14 08:30:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 08:30:57 +0200 |
commit | 6186e296ac328d04b0427b2256eb37223daf5fdc (patch) | |
tree | 001a1159e099f55c66b440a88241ea6018dfd77c /src/init | |
parent | 2996220568d5dcc437b09dcfa2654a90c3ed9809 (diff) |
fix(zsh): work when `setopt ksh_arrays` is set (#1612)
Diffstat (limited to 'src/init')
-rw-r--r-- | src/init/starship.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/init/starship.zsh b/src/init/starship.zsh index 5c521b94c..ed8452de9 100644 --- a/src/init/starship.zsh +++ b/src/init/starship.zsh @@ -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 |