File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,12 @@ __python_argcomplete_which() {
124
124
_python_argcomplete_global() {
125
125
126
126
if [[ -n "${ZSH_VERSION-}" ]]; then
127
+ if [[ "${_matcher_num-}" -gt 1 ]]; then
128
+ # Return early if the completer is called multiple times in the same completion run.
129
+ # Currently the only known occurrence of this is in zsh when a matcher-list zstyle is declared.
130
+ # When this happens, _matcher_num is incremented past 1.
131
+ return
132
+ fi
127
133
# Store result of a regex match in the
128
134
# BASH_REMATCH variable rather than MATCH
129
135
setopt local_options BASH_REMATCH
Original file line number Diff line number Diff line change 34
34
local IFS=$'\013'
35
35
local script="%(argcomplete_script)s"
36
36
if [[ -n "${ZSH_VERSION-}" ]]; then
37
+ if [[ "${_matcher_num-}" -gt 1 ]]; then
38
+ # Return early if the completer is called multiple times in the same completion run.
39
+ # Currently the only known occurrence of this is in zsh when a matcher-list zstyle is declared.
40
+ # When this happens, _matcher_num is incremented past 1.
41
+ return
42
+ fi
37
43
local completions
38
44
completions=($(IFS="$IFS" \
39
45
COMP_LINE="$BUFFER" \
You can’t perform that action at this time.
0 commit comments