Code

Merge branch 'sg/completion'
authorJunio C Hamano <gitster@pobox.com>
Tue, 18 Oct 2011 04:37:13 +0000 (21:37 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Oct 2011 04:37:13 +0000 (21:37 -0700)
* sg/completion:
  completion: unite --format and --pretty for 'log' and 'show'
  completion: unite --reuse-message and --reedit-message for 'notes'

1  2 
contrib/completion/git-completion.bash

index 344119b1b7be234b1c4a87148ce5c0d4ca0d3225,5c649c6f46524dab6e43425a60cdf29876d12763..888e8e10ccd932df3aa8f30a3d83441d5485fc30
@@@ -1552,15 -1601,12 +1552,10 @@@ _git_log (
        if [ -f "$g/MERGE_HEAD" ]; then
                merge="--merge"
        fi
 -      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=*)
@@@ -2366,15 -2448,12 +2359,10 @@@ _git_show (
  {
        __git_has_doubledash && return
  
 -      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
                ;;
        --*)