Skip to content

Commit

Permalink
Fix issue where wrong completions and error are shown in fzf v0.56.1 …
Browse files Browse the repository at this point in the history
…or later
  • Loading branch information
hexium310 committed Nov 18, 2024
1 parent a0593dd commit 781b43b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/parser.zsh
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/usr/bin/env zsh

_fzf_complete_get_command_pos() {
local cmd
local arguments=("${(Q)${(z)@}[@]}")
local cmd=$(__fzf_extract_command "$@")

if [[ "$(which __fzf_extract_command)" == *compstate* ]]; then
cmd=$cmd_word
else
cmd=$(__fzf_extract_command "$@")
fi

echo ${arguments[(i)$cmd]}
}

Expand Down

0 comments on commit 781b43b

Please sign in to comment.