##// END OF EJS Templates
zsh completion: add subrepos options for all supporting commands
Nikolaj Sjujskij -
r17399:dbff6256 default
parent child Browse files
Show More
@@ -455,12 +455,15 b' typeset -A _hg_cmd_globals'
455 '(--branch -b)'{-b+,--branch}'[specify branch(es)]:branch:_hg_branches'
455 '(--branch -b)'{-b+,--branch}'[specify branch(es)]:branch:_hg_branches'
456 )
456 )
457
457
458 _hg_subrepos_opts=(
459 '(--subrepos -S)'{-S,--subrepos}'[recurse into subrepositories]')
460
458 _hg_cmd() {
461 _hg_cmd() {
459 _call_program hg HGPLAIN=1 hg "$_hg_cmd_globals[@]" "$@" 2> /dev/null
462 _call_program hg HGPLAIN=1 hg "$_hg_cmd_globals[@]" "$@" 2> /dev/null
460 }
463 }
461
464
462 _hg_cmd_add() {
465 _hg_cmd_add() {
463 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
466 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts $_hg_subrepos_opts \
464 '*:unknown files:_hg_unknown'
467 '*:unknown files:_hg_unknown'
465 }
468 }
466
469
@@ -483,7 +486,7 b' typeset -A _hg_cmd_globals'
483 }
486 }
484
487
485 _hg_cmd_archive() {
488 _hg_cmd_archive() {
486 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
489 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
487 '--no-decode[do not pass files through decoders]' \
490 '--no-decode[do not pass files through decoders]' \
488 '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \
491 '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \
489 '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_labels' \
492 '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_labels' \
@@ -557,7 +560,7 b' typeset -A _hg_cmd_globals'
557 }
560 }
558
561
559 _hg_cmd_commit() {
562 _hg_cmd_commit() {
560 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
563 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
561 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
564 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
562 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
565 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
563 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' \
566 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' \
@@ -576,8 +579,8 b' typeset -A _hg_cmd_globals'
576
579
577 _hg_cmd_diff() {
580 _hg_cmd_diff() {
578 typeset -A opt_args
581 typeset -A opt_args
579 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
582 _arguments -s -w : $_hg_global_opts $_hg_diff_opts $_hg_ignore_space_opts \
580 $_hg_diff_opts $_hg_ignore_space_opts \
583 $_hg_pat_opts $_hg_subrepos_opts \
581 '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \
584 '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \
582 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
585 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
583 '*:file:->diff_files'
586 '*:file:->diff_files'
@@ -657,6 +660,7 b' typeset -A _hg_cmd_globals'
657
660
658 _hg_cmd_incoming() {
661 _hg_cmd_incoming() {
659 _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
662 _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
663 $_hg_subrepos_opts \
660 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
664 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
661 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_tags' \
665 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_tags' \
662 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
666 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
@@ -706,6 +710,7 b' typeset -A _hg_cmd_globals'
706
710
707 _hg_cmd_outgoing() {
711 _hg_cmd_outgoing() {
708 _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
712 _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
713 $_hg_subrepos_opts \
709 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
714 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
710 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \
715 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \
711 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
716 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
@@ -828,7 +833,7 b' typeset -A _hg_cmd_globals'
828 }
833 }
829
834
830 _hg_cmd_status() {
835 _hg_cmd_status() {
831 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
836 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
832 '(--all -A)'{-A,--all}'[show status of all files]' \
837 '(--all -A)'{-A,--all}'[show status of all files]' \
833 '(--modified -m)'{-m,--modified}'[show only modified files]' \
838 '(--modified -m)'{-m,--modified}'[show only modified files]' \
834 '(--added -a)'{-a,--added}'[show only added files]' \
839 '(--added -a)'{-a,--added}'[show only added files]' \
General Comments 0
You need to be logged in to leave comments. Login now