mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-04-06 17:21:51 +00:00
Fix zsh $+name syntax does not work with setopt ksh_arrays (#4084)
This commit is contained in:
parent
3ec035c68b
commit
0c64c68781
@ -308,7 +308,7 @@ fzf-completion() {
|
|||||||
setopt localoptions noshwordsplit noksh_arrays noposixbuiltins
|
setopt localoptions noshwordsplit noksh_arrays noposixbuiltins
|
||||||
|
|
||||||
# Check if at least one completion system (old or new) is active
|
# Check if at least one completion system (old or new) is active
|
||||||
if ! zmodload -F zsh/parameter p:functions 2>/dev/null || ! (( $+functions[compdef] )); then
|
if ! zmodload -F zsh/parameter p:functions 2>/dev/null || ! (( ${+functions[compdef]} )); then
|
||||||
if ! zmodload -e zsh/compctl; then
|
if ! zmodload -e zsh/compctl; then
|
||||||
zmodload -i zsh/compctl
|
zmodload -i zsh/compctl
|
||||||
fi
|
fi
|
||||||
|
@ -111,7 +111,7 @@ fzf-history-widget() {
|
|||||||
# Ensure the module is loaded if not already, and the required features, such
|
# 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
|
# 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.
|
# 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
|
# Import commands from other shells if SHARE_HISTORY is enabled, as the
|
||||||
# 'history' array only updates after executing a non-empty command.
|
# 'history' array only updates after executing a non-empty command.
|
||||||
selected="$(
|
selected="$(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user