From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Junio C Hamano <gitster@pobox.com>,
"Shawn O. Pearce" <spearce@spearce.org>
Cc: "Jonathan Nieder" <jrnieder@gmail.com>,
git@vger.kernel.org, "SZEDER Gábor" <szeder@ira.uka.de>
Subject: [PATCH 2/2] bash: support pretty format aliases
Date: Thu, 14 Oct 2010 10:58:47 +0200 [thread overview]
Message-ID: <1287046727-22509-2-git-send-email-szeder@ira.uka.de> (raw)
In-Reply-To: <20101014085538.GB838@neumann>
Users can have their own pretty format aliases since 8028184 (pretty:
add aliases for pretty formats, 2010-05-02), so let's offer those
after '--pretty=' and '--format=' for 'log' and 'show', too.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
contrib/completion/git-completion.bash | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 97a3d8c..a4b6f78 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1368,11 +1368,13 @@ _git_log ()
case "$cur" in
--pretty=*)
__gitcomp "$__git_log_pretty_formats
+ $(__git_get_config_variables "pretty")
" "" "${cur##--pretty=}"
return
;;
--format=*)
__gitcomp "$__git_log_pretty_formats
+ $(__git_get_config_variables "pretty")
" "" "${cur##--format=}"
return
;;
@@ -2095,11 +2097,13 @@ _git_show ()
case "$cur" in
--pretty=*)
__gitcomp "$__git_log_pretty_formats
+ $(__git_get_config_variables "pretty")
" "" "${cur##--pretty=}"
return
;;
--format=*)
__gitcomp "$__git_log_pretty_formats
+ $(__git_get_config_variables "pretty")
" "" "${cur##--format=}"
return
;;
--
1.7.3.1.151.g3779c
prev parent reply other threads:[~2010-10-14 8:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-10 21:34 [PATCH] bash: support pretty format aliases SZEDER Gábor
2010-10-10 21:44 ` Jonathan Nieder
2010-10-10 22:06 ` [PATCH v2] " SZEDER Gábor
2010-10-14 8:55 ` SZEDER Gábor
2010-10-14 8:58 ` [PATCH 1/2] bash: add helper function to get config variables for completion SZEDER Gábor
2010-10-14 17:15 ` Jonathan Nieder
2010-10-20 22:29 ` SZEDER Gábor
2010-10-14 8:58 ` SZEDER Gábor [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1287046727-22509-2-git-send-email-szeder@ira.uka.de \
--to=szeder@ira.uka.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).