From: Felipe Contreras Date: Tue, 30 Aug 2022 09:30:58 GMT Subject: [PATCH 11/51] completion: zsh: trivial improvement Message-ID: <20220830093138.1581538-12-felipe.contreras@gmail.com> In-Reply-To: <20220830093138.1581538-1-felipe.contreras@gmail.com> $words has basically all the words we need, except the first one: git. Lets simply add that instead of passing the original, which contains options we don't want to pass downstream (like -c and -C). Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 1905ff98b7..4d81ca73b5 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -220,9 +220,6 @@ __git_zsh_main () { local curcontext="$curcontext" state state_descr line typeset -A opt_args - local -a orig_words - - orig_words=( ${words[@]} ) _arguments -C \ '(-p --paginate --no-pager)'{-p,--paginate}'[pipe all output into ''less'']' \ @@ -262,7 +259,7 @@ __git_zsh_main () (( $+opt_args[--help] )) && command='help' - words=( ${orig_words[@]} ) + words=( git ${words[@]} ) __git_zsh_bash_func $command ;; -- 2.37.2.351.g9bf691b78c.dirty