[zsh-completion] Fix a bug where _fzf_complete did not iterate through args (#1936)

This commit is contained in:
Chitoku 2020-03-24 08:58:22 +09:00 committed by GitHub
parent 07b965bba1
commit 079046863c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -112,7 +112,7 @@ _fzf_complete() {
local args rest str_arg i sep
args=("$@")
sep=
for i in {0..$#args}; do
for i in {0..${#args[@]}}; do
if [[ "${args[$i]}" = -- ]]; then
sep=$i
break

View File

@ -2176,7 +2176,7 @@ unset <%= UNSETS.join(' ') %>
# Old API
_fzf_complete_f() {
_fzf_complete "--multi --prompt \"prompt-f> \"" "$@" < <(
_fzf_complete "+m --multi --prompt \"prompt-f> \"" "$@" < <(
echo foo
echo bar
)
@ -2184,7 +2184,7 @@ _fzf_complete_f() {
# New API
_fzf_complete_g() {
_fzf_complete --multi --prompt "prompt-g> " -- "$@" < <(
_fzf_complete +m --multi --prompt "prompt-g> " -- "$@" < <(
echo foo
echo bar
)