From 3a224ff2bbb8a3782d6db67426aa8bc09063ab08 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Tue, 22 Jul 2014 19:24:56 +0100 Subject: completion: complete "unstuck" `git push --recurse-submodules` Since the argument to `--recurse-submodules` is mandatory, it does not need to be stuck to the option with `=`. Signed-off-by: John Keeping Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'contrib') diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 019026efcb..b27f385adc 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1617,6 +1617,11 @@ _git_push () --repo) __gitcomp_nl "$(__git_remotes)" return + ;; + --recurse-submodules) + __gitcomp "$__git_push_recurse_submodules" + return + ;; esac case "$cur" in --repo=*) -- cgit v1.2.3 From 9e8a6a9433d2e750779a90663e2e9dca8a8c5c71 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Tue, 22 Jul 2014 19:24:57 +0100 Subject: completion: add some missing options to `git push` Signed-off-by: John Keeping Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 1 + 1 file changed, 1 insertion(+) (limited to 'contrib') diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index b27f385adc..4a4ce7be25 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1635,6 +1635,7 @@ _git_push () --*) __gitcomp " --all --mirror --tags --dry-run --force --verbose + --quiet --prune --delete --follow-tags --receive-pack= --repo= --set-upstream --recurse-submodules= " -- cgit v1.2.3 From aaf7253f84477d4be9b56072804e53c3098aaa90 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Tue, 22 Jul 2014 19:24:58 +0100 Subject: completion: complete `git push --force-with-lease=` Signed-off-by: John Keeping Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 4a4ce7be25..5ba24ee106 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1611,6 +1611,22 @@ _git_pull () __git_push_recurse_submodules="check on-demand" +__git_complete_force_with_lease () +{ + local cur_=$1 + + case "$cur_" in + --*=) + ;; + *:*) + __gitcomp_nl "$(__git_refs)" "" "${cur_#*:}" + ;; + *) + __gitcomp_nl "$(__git_refs)" "" "$cur_" + ;; + esac +} + _git_push () { case "$prev" in @@ -1632,12 +1648,16 @@ _git_push () __gitcomp "$__git_push_recurse_submodules" "" "${cur##--recurse-submodules=}" return ;; + --force-with-lease=*) + __git_complete_force_with_lease "${cur##--force-with-lease=}" + return + ;; --*) __gitcomp " --all --mirror --tags --dry-run --force --verbose --quiet --prune --delete --follow-tags --receive-pack= --repo= --set-upstream - --recurse-submodules= + --force-with-lease --force-with-lease= --recurse-submodules= " return ;; -- cgit v1.2.3