aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-09-09 09:13:35 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-09-09 09:13:35 +1200
commit6be0fa7772667d3c8e2a3237fa6c7a1590af3877 (patch)
treebef4c8c315e105ba90673ef08a442f47aa114a2f /bash/bash_completion.d
parentRestore correct short-circuit for gms(1df) (diff)
downloaddotfiles-6be0fa7772667d3c8e2a3237fa6c7a1590af3877.tar.gz
dotfiles-6be0fa7772667d3c8e2a3237fa6c7a1590af3877.zip
Fix null variable reference
Diffstat (limited to 'bash/bash_completion.d')
-rw-r--r--bash/bash_completion.d/git.bash4
1 files changed, 2 insertions, 2 deletions
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