From: ted@tedpavlic.com
To: catalin.marinas@gmail.com
Cc: git@vger.kernel.org, Ted Pavlic <ted@tedpavlic.com>
Subject: [StGit PATCH 2/2] Make bash completion fail to bashdefault before default completion.
Date: Mon, 19 Jan 2009 19:46:13 -0500 [thread overview]
Message-ID: <1232412373-10836-2-git-send-email-ted@tedpavlic.com> (raw)
In-Reply-To: <1232412373-10836-1-git-send-email-ted@tedpavlic.com>
From: Ted Pavlic <ted@tedpavlic.com>
If "-o bashdefault" isn't possible, use old "-o default" only.
(this patch inspired by similar mechanism in Mercurial bash completion
script)
Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
---
stgit/completion.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/stgit/completion.py b/stgit/completion.py
index b3fd282..56e81c2 100644
--- a/stgit/completion.py
+++ b/stgit/completion.py
@@ -129,7 +129,8 @@ def main_switch(commands):
'esac')
def install():
- return ['complete -o default -F _stg stg']
+ return ['complete -o bashdefault -o default -F _stg stg 2>/dev/null \\', [
+ 'complete -o default -F _stg stg' ] ]
def write_completion(f):
commands = stgit.commands.get_commands(allow_cached = False)
--
1.6.1.87.g15624
next prev parent reply other threads:[~2009-01-20 0:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-20 0:46 [StGit PATCH 1/2] Modify bash completion to support help, version, and copyright ted
2009-01-20 0:46 ` ted [this message]
2009-01-22 16:38 ` [StGit PATCH 2/2] Make bash completion fail to bashdefault before default completion Ted Pavlic
2009-01-22 16:44 ` Ted Pavlic
2009-01-22 23:29 ` kha/{stable,safe,experimental} updated Karl Hasselström
2009-01-23 0:26 ` [kha/safe PATCH] completion bugfix: Place double pipes in front of alternate command Ted Pavlic
2009-01-23 1:35 ` Karl Hasselström
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=1232412373-10836-2-git-send-email-ted@tedpavlic.com \
--to=ted@tedpavlic.com \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.