Skip to content
Myr

Modify _bashcomplete for zsh use

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

Zsh has support for loading bash completion functions, but dies on the syntax here. Adding 'env' works on both bash and zsh. zsh instructions: 1. autoload bashcompinit && bashcompinit 2. Follow bash instructions.

authored by Dwight Holman · committed by Dwight Holman · parent 61de694 · Browse files · 1 file+1 added−1 removed
This commit

State

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

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:click/_bashcomplete.py+1 added-1 removed
4 unmodified lines
567COMPLETION_SCRIPT = '''8%(complete_func)s() {9 COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\9 COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \\10 COMP_CWORD=$COMP_CWORD \\11 %(autocomplete_var)s=complete $1 ) )12 return 013}
61 unmodified lines