summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash2
-rw-r--r--contrib/completion/git-completion.zsh2
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 4dd268470a..4073d67f3b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1306,7 +1306,7 @@ __git_count_arguments ()
local word i c=0
# Skip "git" (first argument)
- for ((i="$__git_cmd_idx"; i < ${#words[@]}; i++)); do
+ for ((i=$__git_cmd_idx; i < ${#words[@]}; i++)); do
word="${words[i]}"
case "$word" in
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 6c56296997..cac6f61881 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -251,7 +251,7 @@ __git_zsh_main ()
done
;;
(arg)
- local command="${words[1]}" __git_dir
+ local command="${words[1]}" __git_dir __git_cmd_idx=1
if (( $+opt_args[--bare] )); then
__git_dir='.'