From 0c64c6878154da1db90084dddc81608e47bd7e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=83=E9=87=8C?= Date: Tue, 12 Nov 2024 02:53:36 +1100 Subject: Fix zsh $+name syntax does not work with setopt ksh_arrays (#4084) --- shell/key-bindings.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell/key-bindings.zsh') diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index c8c20767..36881185 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -111,7 +111,7 @@ fzf-history-widget() { # Ensure the module is loaded if not already, and the required features, such # as the associative 'history' array, which maps event numbers to full history # lines, are set. Also, make sure Perl is installed for multi-line output. - if zmodload -F zsh/parameter p:{commands,history} 2>/dev/null && (( $+commands[perl] )); then + if zmodload -F zsh/parameter p:{commands,history} 2>/dev/null && (( ${+commands[perl]} )); then # Import commands from other shells if SHARE_HISTORY is enabled, as the # 'history' array only updates after executing a non-empty command. selected="$( -- cgit v1.2.3