threads / patch / 16994

patch, 2 partstg-completion: complete options for `tg summary`

Subject: [PATCH (topgit) 1/2] tg-completion: complete options for `tg summary`

## tl;dr

4 messages between Jan 5, 2009 and Jan 5, 2009. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Kirill Smelkov· Jan 5, 2009, 15:08 UTC · lore

[PATCH (topgit) 0/2] tg-completion.bash update

Kirill Smelkov (2):
  tg-completion: complete options for `tg summary`
  tg-completion: complete options for `tg remote`
 contrib/tg-completion.bash |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)
Kirill Smelkov· Jan 5, 2009, 15:08 UTC · re: Kirill Smelkov · lore
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
---
 contrib/tg-completion.bash |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
Show changes to contrib/tg-completion.bash +9 −1
diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash
index 67f820e..4d69c05 100755
--- a/contrib/tg-completion.bash
+++ b/contrib/tg-completion.bash
@@ -376,7 +376,15 @@ _tg_remote ()
 
 _tg_summary ()
 {
-	COMPREPLY=()
+	local cur="${COMP_WORDS[COMP_CWORD]}"
+
+	case "$cur" in
+	*)
+		__tgcomp "
+			--graphviz
+			-t
+		"
+	esac
 }
 
 _tg_update ()
-- 
1.6.1.40.g8ea6a
Kirill Smelkov· Jan 5, 2009, 15:08 UTC · re: Kirill Smelkov · lore

[PATCH (topgit) 2/2] tg-completion: complete options for `tg remote`

Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
---
 contrib/tg-completion.bash |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Show changes to contrib/tg-completion.bash +5 −0
diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash
index 4d69c05..9641d04 100755
--- a/contrib/tg-completion.bash
+++ b/contrib/tg-completion.bash
@@ -369,6 +369,11 @@ _tg_remote ()
 	local cur="${COMP_WORDS[COMP_CWORD]}"
 
 	case "$cur" in
+	-*)
+		__tgcomp "
+			--populate
+		"
+		;;
 	*)
 		__tgcomp "$(__tg_remotes)"
 	esac
-- 
1.6.1.40.g8ea6a
martin f krafft· Jan 5, 2009, 15:49 UTC · re: Kirill Smelkov · lore

Re: [PATCH (topgit) 0/2] tg-completion.bash update

also sprach Kirill Smelkov <kirr@landau.phys.spbu.ru> [2009.01.05.1608 +0100]:
> Kirill Smelkov (2):
>   tg-completion: complete options for `tg summary`
>   tg-completion: complete options for `tg remote`
Pushed; thanks.
-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
"alles sollte so einfach, wie möglich gemacht sein,
 aber nicht einfacher."
                                                    -- albert einstein
 
spamtraps: madduck.bogus@madduck.net

← back to recent threads