From afdf75bc6f43f1d1584468665ea1147c22b9767c Mon Sep 17 00:00:00 2001 From: Andrey Kislyuk Date: Wed, 1 Nov 2023 21:58:08 -0700 Subject: [PATCH] Call _default as a fallback in zsh --- argcomplete/bash_completion.d/_python-argcomplete | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/argcomplete/bash_completion.d/_python-argcomplete b/argcomplete/bash_completion.d/_python-argcomplete index 4c7edda3..1e4c66ce 100644 --- a/argcomplete/bash_completion.d/_python-argcomplete +++ b/argcomplete/bash_completion.d/_python-argcomplete @@ -138,8 +138,10 @@ _python_argcomplete_global() { req_argv=( "" "${COMP_WORDS[@]:1}" ) __python_argcomplete_expand_tilde_by_ref executable else - # TODO: check if we should call _default or use a different condition here if [[ "$service" != "-default-" ]]; then + # TODO: this may not be sufficient - see https://zsh.sourceforge.io/Doc/Release/Completion-System.html + # May need to call _complete with avoid-completer=_python-argcomplete or something like that + _default return fi executable="${words[1]}"