From 05ba6cfbe5c9ac15fdefa777eaf052429f13cb1c Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Sun, 8 Mar 2020 20:41:46 -0600 Subject: [PATCH] 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! --- zoxide.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zoxide.plugin.zsh b/zoxide.plugin.zsh index ef25c32..ee1678c 100644 --- a/zoxide.plugin.zsh +++ b/zoxide.plugin.zsh @@ -5,7 +5,7 @@ _zoxide_precmd() { } [[ -n "${precmd_functions[(r)_zoxide_precmd]}" ]] || { - precmd_functions+=_zoxide_precmd + precmd_functions+=(_zoxide_precmd) } z() {