m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Enhance command extraction in zsh completion (#4082)

Fix #1992
This commit is contained in:
LangLangBart
2024-11-10 09:40:59 +01:00
committed by GitHub
parent 51623a5f6a
commit 57c08d925f
2 changed files with 30 additions and 25 deletions

View File

@@ -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="$(