Skip to content

Commit

Permalink
completion: unite --format and --pretty for 'log' and 'show'
Browse files Browse the repository at this point in the history
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
SZEDER Gábor authored and Junio C Hamano committed Oct 10, 2011
1 parent a8f89bf commit e67d71e
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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=*)
Expand Down Expand Up @@ -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
;;
--*)
Expand Down

0 comments on commit e67d71e

Please sign in to comment.