git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Petr Baudis <pasky@suse.cz>
Cc: Bert Wesarg <bert.wesarg@googlemail.com>,
	git@vger.kernel.org, martin f krafft <madduck@debian.org>,
	Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Subject: [TopGit PATCH v2] tg-push: add bash completion
Date: Wed, 27 May 2009 01:31:34 +0200	[thread overview]
Message-ID: <1243380694-7744-1-git-send-email-bert.wesarg@googlemail.com> (raw)
In-Reply-To: <1243377428-27546-1-git-send-email-bert.wesarg@googlemail.com>

Include all options.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>

---
 contrib/tg-completion.bash |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

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 ;;
-- 
tg: (b725fc9..) bw/push-completion (depends on: master)

  reply	other threads:[~2009-05-26 23:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 22:37 [TopGit PATCH] tg-push: add bash completion Bert Wesarg
2009-05-26 23:31 ` Bert Wesarg [this message]
2009-06-02 20:44   ` [TopGit PATCH v2] " Bert Wesarg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1243380694-7744-1-git-send-email-bert.wesarg@googlemail.com \
    --to=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=madduck@debian.org \
    --cc=pasky@suse.cz \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).