git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bash: add 'git stash apply --index' option
@ 2008-03-14 11:15 SZEDER Gábor
  2008-03-14 11:15 ` [PATCH] bash: removed unnecessary checks for long options with argument SZEDER Gábor
  0 siblings, 1 reply; 2+ messages in thread
From: SZEDER Gábor @ 2008-03-14 11:15 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Junio C Hamano, git, SZEDER Gábor

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
 contrib/completion/git-completion.bash |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 5046f69..2265757 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1126,8 +1126,19 @@ _git_show ()
 _git_stash ()
 {
 	local subcommands='save list show apply clear drop pop create'
-	if [ -z "$(__git_find_subcommand "$subcommands")" ]; then
+	local subcommand="$(__git_find_subcommand "$subcommands")"
+	if [ -z "$subcommand" ]; then
 		__gitcomp "$subcommands"
+	else
+		local cur="${COMP_WORDS[COMP_CWORD]}"
+		case "$subcommand,$cur" in
+		apply,--*)
+			__gitcomp "--index"
+			;;
+		*)
+			COMPREPLY=()
+			;;
+		esac
 	fi
 }
 
-- 
1.5.4.4.532.ga6828

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

* [PATCH] bash: removed unnecessary checks for long options with argument
  2008-03-14 11:15 [PATCH] bash: add 'git stash apply --index' option SZEDER Gábor
@ 2008-03-14 11:15 ` SZEDER Gábor
  0 siblings, 0 replies; 2+ messages in thread
From: SZEDER Gábor @ 2008-03-14 11:15 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Junio C Hamano, git, SZEDER Gábor

__gitcomp takes care of it since 5447aac7 (bash: fix long option with
argument double completion, 2008-03-05)

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
 contrib/completion/git-completion.bash |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 2265757..0bb78e7 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -539,7 +539,6 @@ _git_branch ()
 	done
 
 	case "${COMP_WORDS[COMP_CWORD]}" in
-	--*=*)	COMPREPLY=() ;;
 	--*)
 		__gitcomp "
 			--color --no-color --verbose --abbrev= --no-abbrev
@@ -1288,7 +1287,6 @@ _git ()
 
 	if [ -z "$command" ]; then
 		case "${COMP_WORDS[COMP_CWORD]}" in
-		--*=*) COMPREPLY=() ;;
 		--*)   __gitcomp "
 			--paginate
 			--no-pager
-- 
1.5.4.4.532.ga6828

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

end of thread, other threads:[~2008-03-14 11:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 11:15 [PATCH] bash: add 'git stash apply --index' option SZEDER Gábor
2008-03-14 11:15 ` [PATCH] bash: removed unnecessary checks for long options with argument SZEDER Gábor

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).