aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-09-09 09:15:44 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-09-09 09:15:44 +1200
commitb0b68d22bc9c063596e7697fa260172ca2b771e8 (patch)
tree01739aa0431473a7ae734591c9b1d64be327009d /bash/bash_completion.d
parentFix null variable reference (diff)
downloaddotfiles-b0b68d22bc9c063596e7697fa260172ca2b771e8.tar.gz
dotfiles-b0b68d22bc9c063596e7697fa260172ca2b771e8.zip
Correct a word test
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 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