Skip to content

Commit

Permalink
Merge branch 'sg/completion'
Browse files Browse the repository at this point in the history
* sg/completion:
  completion: unite --format and --pretty for 'log' and 'show'
  completion: unite --reuse-message and --reedit-message for 'notes'
  • Loading branch information
Junio C Hamano committed Oct 18, 2011
2 parents e22bb14 + e67d71e commit 6e97fcc
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -1553,14 +1553,9 @@ _git_log ()
merge="--merge"
fi
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 @@ -1668,11 +1663,9 @@ _git_notes ()
;;
esac
;;
add,--reuse-message=*|append,--reuse-message=*)
__gitcomp "$(__git_refs)" "" "${cur##--reuse-message=}"
;;
add,--reuse-message=*|append,--reuse-message=*|\
add,--reedit-message=*|append,--reedit-message=*)
__gitcomp "$(__git_refs)" "" "${cur##--reedit-message=}"
__gitcomp "$(__git_refs)" "" "${cur#*=}"
;;
add,--*|append,--*)
__gitcomp '--file= --message= --reedit-message=
Expand Down Expand Up @@ -2367,14 +2360,9 @@ _git_show ()
__git_has_doubledash && return

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 6e97fcc

Please sign in to comment.