@@ -217,15 +217,16 @@ __git_zsh_main ()
local -a __git_C_args
_arguments -C \
- '(-p --paginate --no-pager)'{-p,--paginate}'[pipe all output into ''less'']' \
- '(-p --paginate)--no-pager[do not pipe git output into a pager]' \
- '--git-dir=[set the path to the repository]: :_directories' \
- '--bare[treat the repository as a bare repository]' \
+ '(-p --paginate -P --no-pager)'{-p,--paginate}'[pipe all output into ''less'']' \
+ '(-p --paginate -P --no-pager)'{-P,--no-pager}'[do not pipe git output into a pager]' \
+ '(--bare)--git-dir=[set the path to the repository]: :_directories' \
+ '(--git-dir)--bare[treat the repository as a bare repository]' \
'(- :)--version[prints the git suite version]' \
- '--exec-path=[path to where your core git programs are installed]:: :_directories' \
- '--html-path[print the path where git''s HTML documentation is installed]' \
- '--info-path[print the path where the Info files are installed]' \
- '--man-path[print the manpath (see `man(1)`) for the man pages]' \
+ '--exec-path=[path to where your core git programs are installed]: :_directories' \
+ '(- :)--exec-path[print the path where your core git programs are installed]' \
+ '(- :)--html-path[print the path where git''s HTML documentation is installed]' \
+ '(- :)--info-path[print the path where the Info files are installed]' \
+ '(- :)--man-path[print the manpath (see `man(1)`) for the man pages]' \
'--work-tree=[set the path to the working tree]: :_directories' \
'--namespace=[set the git namespace]:' \
'--no-replace-objects[do not use replacement refs to replace git objects]' \
@@ -802,7 +802,7 @@ test_expect_success 'general options' '
test_completion "git --no-r" "--no-replace-objects"
'
-test_expect_failure 'general options plus command' '
+test_expect_success 'general options plus command' '
test_completion "git --version check" "" &&
test_completion "git --paginate check" "checkout" &&
test_completion "git --git-dir=foo check" "checkout" &&
Add more excluded options, for example: --bare excludes --git-dir. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- contrib/completion/git-completion.zsh | 17 +++++++++-------- t/t9904-zsh-completion.sh | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-)