Skip to content

Commit

Permalink
bash completion: add --format= and --oneline options for "git log"
Browse files Browse the repository at this point in the history
We also add --format= completion for "git show".

Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Teemu Likonen authored and Junio C Hamano committed Feb 27, 2009
1 parent bb93afd commit 72de29c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,11 @@ _git_log ()
" "" "${cur##--pretty=}"
return
;;
--format=*)
__gitcomp "$__git_log_pretty_formats
" "" "${cur##--format=}"
return
;;
--date=*)
__gitcomp "
relative iso8601 rfc2822 short local default
Expand All @@ -1029,7 +1034,7 @@ _git_log ()
--follow
--abbrev-commit --abbrev=
--relative-date --date=
--pretty=
--pretty= --format= --oneline
--cherry-pick
--graph
--decorate
Expand Down Expand Up @@ -1541,8 +1546,13 @@ _git_show ()
" "" "${cur##--pretty=}"
return
;;
--format=*)
__gitcomp "$__git_log_pretty_formats
" "" "${cur##--format=}"
return
;;
--*)
__gitcomp "--pretty=
__gitcomp "--pretty= --format=
$__git_diff_common_options
"
return
Expand Down

0 comments on commit 72de29c

Please sign in to comment.