Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Chitoku · committed by GitHub · parent 07b965b · Browse files · 2 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−3 removed

  • tests:+2 added−2 removed
  • other:+1 added−1 removed

2 files+3 added−3 removed

modified:shell/completion.zsh+1 added-1 removed
110 unmodified lines
111 # Split arguments around --112 local args rest str_arg i sep113 args=("$@")114 sep=115 for i in {0..$#args}; do115 for i in {0..${#args[@]}}; do116 if [[ "${args[$i]}" = -- ]]; then117 sep=$i118 break119 fi
125 unmodified lines
modified:test/test_go.rb+2 added-2 removed
2174 unmodified lines
2175unset <%= UNSETS.join(' ') %>21762177# Old API2178_fzf_complete_f() {2179 _fzf_complete "--multi --prompt \"prompt-f> \"" "$@" < <(2179 _fzf_complete "+m --multi --prompt \"prompt-f> \"" "$@" < <(2180 echo foo2181 echo bar2182 )2183}21842185# New API2186_fzf_complete_g() {2187 _fzf_complete --multi --prompt "prompt-g> " -- "$@" < <(2187 _fzf_complete +m --multi --prompt "prompt-g> " -- "$@" < <(2188 echo foo2189 echo bar2190 )2191}
22 unmodified lines