summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder@ira.uka.de>2011-10-08 03:09:34 +0200
committerJunio C Hamano <gitster@pobox.com>2011-10-10 10:02:55 -0700
commite67d71e559724eacb6a799f8be42058da52a8580 (patch)
tree36e8cb8f38ca32d3cd14fbf5d612cc0d42862da1 /contrib
parenta8f89bfa999dde7fa801ffc29bc89a1f053849e6 (diff)
downloadgit-e67d71e559724eacb6a799f8be42058da52a8580.tar.gz
completion: unite --format and --pretty for 'log' and 'show'
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash18
1 files changed, 4 insertions, 14 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 4a857b680f..5c649c6f46 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1604,14 +1604,9 @@ _git_log ()
local cur
_get_comp_words_by_ref -n =: cur
case "$cur" in
- --pretty=*)
+ --pretty=*|--format=*)
__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
- " "" "${cur##--pretty=}"
- return
- ;;
- --format=*)
- __gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
- " "" "${cur##--format=}"
+ " "" "${cur#*=}"
return
;;
--date=*)
@@ -2456,14 +2451,9 @@ _git_show ()
local cur
_get_comp_words_by_ref -n =: cur
case "$cur" in
- --pretty=*)
- __gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
- " "" "${cur##--pretty=}"
- return
- ;;
- --format=*)
+ --pretty=*|--format=*)
__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
- " "" "${cur##--format=}"
+ " "" "${cur#*=}"
return
;;
--*)