Merge branch 'jk/bash-completion'

* jk/bash-completion:
  completion: learn about --man-path
  completion: handle unstuck form of base git options
This commit is contained in:
Junio C Hamano 2013-07-11 13:05:28 -07:00
commit 04ce89389d
2 changed files with 4 additions and 1 deletions

View File

@ -2490,9 +2490,10 @@ __git_main ()
i="${words[c]}" i="${words[c]}"
case "$i" in case "$i" in
--git-dir=*) __git_dir="${i#--git-dir=}" ;; --git-dir=*) __git_dir="${i#--git-dir=}" ;;
--git-dir) ((c++)) ; __git_dir="${words[c]}" ;;
--bare) __git_dir="." ;; --bare) __git_dir="." ;;
--help) command="help"; break ;; --help) command="help"; break ;;
-c) c=$((++c)) ;; -c|--work-tree|--namespace) ((c++)) ;;
-*) ;; -*) ;;
*) command="$i"; break ;; *) command="$i"; break ;;
esac esac
@ -2510,6 +2511,7 @@ __git_main ()
--exec-path --exec-path
--exec-path= --exec-path=
--html-path --html-path
--man-path
--info-path --info-path
--work-tree= --work-tree=
--namespace= --namespace=

View File

@ -365,6 +365,7 @@ test_expect_success 'double dash "git" itself' '
--exec-path Z --exec-path Z
--exec-path= --exec-path=
--html-path Z --html-path Z
--man-path Z
--info-path Z --info-path Z
--work-tree= --work-tree=
--namespace= --namespace=