Skip to content

Commit

Permalink
Revert "Use -first- instead of -default- when installing zsh global c…
Browse files Browse the repository at this point in the history
…ompleter"

This reverts commit 95da435.
  • Loading branch information
evanunderscore committed Dec 8, 2023
1 parent 95da435 commit 931c673
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions argcomplete/bash_completion.d/_python-argcomplete
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ __python_argcomplete_which() {
}

_python_argcomplete_global() {

if [[ -n "${ZSH_VERSION-}" ]]; then
# Store result of a regex match in the
# BASH_REMATCH variable rather than MATCH
Expand Down Expand Up @@ -236,8 +237,8 @@ if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o default -o bashdefault -D -F _python_argcomplete_global
else
autoload is-at-least
# Set a hook for argcomplete to be called first if no other completers are defined for the given command.
# "compdef _python_argcomplete_global -P *" overrides other special contexts that we want to preserve:
# Replace only the default completer (_default).
# There are many other special contexts we don't want to override.
# https://zsh.sourceforge.io/Doc/Release/Completion-System.html
compdef _python_argcomplete_global -first-
compdef _python_argcomplete_global -default-
fi

0 comments on commit 931c673

Please sign in to comment.