fix(zsh): append `_zoxide_precmd` as a single-element array to hook

We should append `_zoxide_precmd` to `precmd_functions` within an array literal, not by itself.

This is important because...well, nothing works unless you append an *array* to another array, because that's what's expected in `zsh` and `bash`! Is it weird? Yes. But that's the type system we live with!
This commit is contained in:
Erich Gubler 2020-03-08 20:41:46 -06:00 committed by GitHub
parent 5a6f077ab6
commit 05ba6cfbe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ _zoxide_precmd() {
}
[[ -n "${precmd_functions[(r)_zoxide_precmd]}" ]] || {
precmd_functions+=_zoxide_precmd
precmd_functions+=(_zoxide_precmd)
}
z() {