Skip to content

Commit

Permalink
Fix zsh autoload issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Mar 20, 2023
1 parent 7a41611 commit ac3d12a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions argcomplete/bash_completion.d/python-argcomplete
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#compdef -P *

# Copyright 2012-2023, Andrey Kislyuk and argcomplete contributors.
# Licensed under the Apache License. See https://github.com/kislyuk/argcomplete for more info.

Expand Down Expand Up @@ -66,7 +68,7 @@ _python_argcomplete_global() {
local executable=$1
__python_argcomplete_expand_tilde_by_ref executable
else
if [[ "$service" != "-default-" ]]; then
if [[ "$service" == "-default-" ]]; then
return
fi
local executable=${words[1]}
Expand Down Expand Up @@ -136,7 +138,7 @@ _python_argcomplete_global() {
fi
}
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o default -o bashdefault -D -F _python_argcomplete_global
complete -o default -o bashdefault -D -F _python_argcomplete_global
else
compdef _python_argcomplete_global -P '*' -N
compdef _python_argcomplete_global -P '*'
fi

0 comments on commit ac3d12a

Please sign in to comment.