git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bash completion patch
@ 2014-02-05 15:13 乙酸鋰
  2014-02-05 16:08 ` Matthieu Moy
  0 siblings, 1 reply; 5+ messages in thread
From: 乙酸鋰 @ 2014-02-05 15:13 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 25 bytes --]

add --recurse-submodules

[-- Attachment #2: 0001-bash-completion-Add-recurse-submodules.patch --]
[-- Type: text/x-patch, Size: 1921 bytes --]

From 0390a24e2653e0cdb6bfb9a569c28e4d58002038 Mon Sep 17 00:00:00 2001
From: Sup Yut Sum <ch3cooli@gmail.com>
Date: Wed, 5 Feb 2014 23:09:46 +0800
Subject: [PATCH 1/1] bash completion: Add --recurse-submodules

---
 contrib/completion/git-completion.bash | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 9525343..87de809 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1221,14 +1221,20 @@ _git_difftool ()
 	__git_complete_revlist_file
 }
 
+__git_fetch_recurse_submodules="yes on-demand no"
+
 __git_fetch_options="
 	--quiet --verbose --append --upload-pack --force --keep --depth=
-	--tags --no-tags --all --prune --dry-run
+	--tags --no-tags --all --prune --dry-run --recurse-submodules=
 "
 
 _git_fetch ()
 {
 	case "$cur" in
+	--recurse-submodules=*)
+		__gitcomp "$__git_fetch_recurse_submodules" "" "${cur##--recurse-submodules=}"
+		return
+		;;
 	--*)
 		__gitcomp "$__git_fetch_options"
 		return
@@ -1583,6 +1589,10 @@ _git_pull ()
 	__git_complete_strategy && return
 
 	case "$cur" in
+	--recurse-submodules=*)
+		__gitcomp "$__git_fetch_recurse_submodules" "" "${cur##--recurse-submodules=}"
+		return
+		;;
 	--*)
 		__gitcomp "
 			--rebase --no-rebase
@@ -1595,6 +1605,8 @@ _git_pull ()
 	__git_complete_remote_or_refspec
 }
 
+__git_push_recurse_submodules="check on-demand"
+
 _git_push ()
 {
 	case "$prev" in
@@ -1607,10 +1619,15 @@ _git_push ()
 		__gitcomp_nl "$(__git_remotes)" "" "${cur##--repo=}"
 		return
 		;;
+	--recurse-submodules=*)
+		__gitcomp "$__git_push_recurse_submodules" "" "${cur##--recurse-submodules=}"
+		return
+		;;
 	--*)
 		__gitcomp "
 			--all --mirror --tags --dry-run --force --verbose
 			--receive-pack= --repo= --set-upstream
+			--recurse-submodules=
 		"
 		return
 		;;
-- 
1.8.5.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-10 18:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 15:13 bash completion patch 乙酸鋰
2014-02-05 16:08 ` Matthieu Moy
2014-02-05 18:47   ` Junio C Hamano
2014-02-09  8:58     ` Thomas Rast
2014-02-10 18:38       ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).