From c170d1920993fdebda397668cc1a6a8086fe1624 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Wed, 27 May 2009 01:31:34 +0200 Subject: [PATCH] tg-push: add bash completion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include all options. Signed-off-by: Bert Wesarg Signed-off-by: Uwe Kleine-König --- contrib/tg-completion.bash | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/contrib/tg-completion.bash b/contrib/tg-completion.bash index de8a7b5..0ee233c 100755 --- a/contrib/tg-completion.bash +++ b/contrib/tg-completion.bash @@ -370,6 +370,29 @@ _tg_patch () esac } +_tg_push () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + + __tg_complete_arg "-r" && { + __tgcomp "$(__tg_remotes)" + return + } + + case "$cur" in + -*) + __tgcomp " + --no-deps + --dry-run + --tgish-only + -r + " + ;; + *) + __tgcomp "$(__tg_topics)" + esac +} + _tg_remote () { local cur="${COMP_WORDS[COMP_CWORD]}" @@ -449,6 +472,7 @@ _tg () info) _tg_info ;; mail) _tg_mail ;; patch) _tg_patch ;; + push) _tg_push ;; remote) _tg_remote ;; summary) _tg_summary ;; update) _tg_update ;;