From 6be0fa7772667d3c8e2a3237fa6c7a1590af3877 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 9 Sep 2016 09:13:35 +1200 Subject: Fix null variable reference --- 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 49313867..dd43fdbc 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 ((CWORD == 1)) ; then + if ((COMP_CWORD == 1)) ; 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 ((CWORD == 1)) ; then + if ((COMP_CWORD == 1)) ; then _git remotes else _git refs -- cgit v1.2.3