From b0b68d22bc9c063596e7697fa260172ca2b771e8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 9 Sep 2016 09:15:44 +1200 Subject: Correct a word test --- bash/bash_completion.d/git.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bash') diff --git a/bash/bash_completion.d/git.bash b/bash/bash_completion.d/git.bash index dd43fdbc..2e77184a 100644 --- a/bash/bash_completion.d/git.bash +++ b/bash/bash_completion.d/git.bash @@ -132,7 +132,7 @@ _git() { # Complete with remote subcommands and then remote names remote) local word - if ((COMP_CWORD == 1)) ; then + if ((COMP_CWORD == 2)) ; then while IFS= read -r word ; do [[ -n $word ]] || continue COMPREPLY[${#COMPREPLY[@]}]=$word @@ -156,7 +156,7 @@ _git() { # Complete with remotes and then refs fetch|pull|push) - if ((COMP_CWORD == 1)) ; then + if ((COMP_CWORD == 2)) ; then _git remotes else _git refs -- cgit v1.2.3