From: Mark Levedahl <mdl123@verizon.net>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Git Mailing List <git@vger.kernel.org>,
Mark Levedahl <mdl123@verizon.net>
Subject: [PATCH] git-completion.bash - add support for git-bundle
Date: Sun, 12 Aug 2007 14:46:12 -0400 [thread overview]
Message-ID: <11869443722087-git-send-email-mdl123@verizon.net> (raw)
Signed-off-by: Mark Levedahl <mdl123@verizon.net>
---
contrib/completion/git-completion.bash | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 82b9ed4..52b2893 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -459,6 +459,35 @@ _git_branch ()
__gitcomp "$(__git_refs)"
}
+_git_bundle ()
+{
+ local mycword="$COMP_CWORD"
+ case "${COMP_WORDS[0]}" in
+ git)
+ local cmd="${COMP_WORDS[2]}"
+ mycword="$((mycword-1))"
+ ;;
+ git-bundle*)
+ local cmd="${COMP_WORDS[1]}"
+ ;;
+ esac
+ case "$mycword" in
+ 1)
+ __gitcomp "create list-heads verify unbundle"
+ ;;
+ 2)
+ # looking for a file
+ ;;
+ *)
+ case "$cmd" in
+ create)
+ __git_complete_revlist
+ ;;
+ esac
+ ;;
+ esac
+}
+
_git_checkout ()
{
__gitcomp "$(__git_refs)"
@@ -1009,6 +1038,7 @@ _git ()
add) _git_add ;;
apply) _git_apply ;;
bisect) _git_bisect ;;
+ bundle) _git_bundle ;;
branch) _git_branch ;;
checkout) _git_checkout ;;
cherry) _git_cherry ;;
@@ -1057,6 +1087,7 @@ complete -o default -o nospace -F _git_am git-am
complete -o default -o nospace -F _git_apply git-apply
complete -o default -o nospace -F _git_bisect git-bisect
complete -o default -o nospace -F _git_branch git-branch
+complete -o default -o nospace -F _git_bundle git-bundle
complete -o default -o nospace -F _git_checkout git-checkout
complete -o default -o nospace -F _git_cherry git-cherry
complete -o default -o nospace -F _git_cherry_pick git-cherry-pick
@@ -1092,6 +1123,7 @@ complete -o default -o nospace -F _git_add git-add.exe
complete -o default -o nospace -F _git_apply git-apply.exe
complete -o default -o nospace -F _git git.exe
complete -o default -o nospace -F _git_branch git-branch.exe
+complete -o default -o nospace -F _git_bundle git-bundle.exe
complete -o default -o nospace -F _git_cherry git-cherry.exe
complete -o default -o nospace -F _git_diff git-diff.exe
complete -o default -o nospace -F _git_format_patch git-format-patch.exe
--
1.5.3.rc4.80.ge600
next reply other threads:[~2007-08-12 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-12 18:46 Mark Levedahl [this message]
2007-08-14 3:39 ` [PATCH] git-completion.bash - add support for git-bundle Shawn O. Pearce
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=11869443722087-git-send-email-mdl123@verizon.net \
--to=mdl123@verizon.net \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/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).