comparison contrib/zsh_completion @ 39589:5f06c21d37de

zsh_completion: update various arguments, descriptions, metavariables Addition of "=" means the flag must have an argument after it. Differential Revision: https://phab.mercurial-scm.org/D4518
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 10 Sep 2018 16:43:49 +0800
parents 45d12c49c3f3
children a2d17b699628
comparison
equal deleted inserted replaced
39588:b6b9488aae4c 39589:5f06c21d37de
382 _hg_global_opts=( 382 _hg_global_opts=(
383 '(--repository -R)'{-R+,--repository=}'[repository root directory or name of overlay bundle file]:repository:_files -/' 383 '(--repository -R)'{-R+,--repository=}'[repository root directory or name of overlay bundle file]:repository:_files -/'
384 '--cwd=[change working directory]:new working directory:_files -/' 384 '--cwd=[change working directory]:new working directory:_files -/'
385 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, automatically pick the first choice for all prompts]' 385 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, automatically pick the first choice for all prompts]'
386 '(--verbose -v)'{-v,--verbose}'[enable additional output]' 386 '(--verbose -v)'{-v,--verbose}'[enable additional output]'
387 '*--config[set/override config option]:defined config items:_hg_config' 387 '*--config=[set/override config option]:defined config items:_hg_config'
388 '(--quiet -q)'{-q,--quiet}'[suppress output]' 388 '(--quiet -q)'{-q,--quiet}'[suppress output]'
389 '(--help -h)'{-h,--help}'[display help and exit]' 389 '(--help -h)'{-h,--help}'[display help and exit]'
390 '--debug[enable debugging output]' 390 '--debug[enable debugging output]'
391 '--debugger[start debugger]' 391 '--debugger[start debugger]'
392 '--encoding=[set the charset encoding]:encoding' 392 '--encoding=[set the charset encoding]:encoding'
399 '--color=[when to colorize]:when:(true false yes no always auto never debug)' 399 '--color=[when to colorize]:when:(true false yes no always auto never debug)'
400 '--pager=[when to paginate (default: auto)]:when:(true false yes no always auto never)' 400 '--pager=[when to paginate (default: auto)]:when:(true false yes no always auto never)'
401 ) 401 )
402 402
403 _hg_pat_opts=( 403 _hg_pat_opts=(
404 '*'{-I+,--include=}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/' 404 '*'{-I+,--include=}'[include names matching the given patterns]:pattern:_files -W $(_hg_cmd root) -/'
405 '*'{-X+,--exclude=}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/') 405 '*'{-X+,--exclude=}'[exclude names matching the given patterns]:pattern:_files -W $(_hg_cmd root) -/')
406 406
407 _hg_clone_opts=( 407 _hg_clone_opts=(
408 $_hg_remote_opts 408 $_hg_remote_opts
409 '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]' 409 '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]'
410 '--pull[use pull protocol to copy metadata]' 410 '--pull[use pull protocol to copy metadata]'
437 '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' 437 '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]'
438 '(--ignore-space-at-eol -Z)'{-Z,--ignore-space-at-eol}'[ignore changes in whitespace at EOL]' 438 '(--ignore-space-at-eol -Z)'{-Z,--ignore-space-at-eol}'[ignore changes in whitespace at EOL]'
439 ) 439 )
440 440
441 _hg_template_opts=( 441 _hg_template_opts=(
442 '--template[display with template]:template' 442 '(--template -T)'{-T+,--template=}'[display with template]:template'
443 ) 443 )
444 444
445 _hg_log_opts=( 445 _hg_log_opts=(
446 $_hg_global_opts $_hg_template_opts $_hg_gitlike_opts 446 $_hg_global_opts $_hg_template_opts $_hg_gitlike_opts
447 '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:limit' 447 '(--limit -l)'{-l+,--limit=}'[limit number of changes displayed]:limit'
556 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \ 556 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \
557 '(--force -f)'{-f,--force}'[run even when the destination is unrelated]' \ 557 '(--force -f)'{-f,--force}'[run even when the destination is unrelated]' \
558 '(2)*--base[a base changeset assumed to be available at the destination]:revision:_hg_labels' \ 558 '(2)*--base[a base changeset assumed to be available at the destination]:revision:_hg_labels' \
559 '*'{-b+,--branch=}'[a specific branch you would like to bundle]:branch:_hg_branches' \ 559 '*'{-b+,--branch=}'[a specific branch you would like to bundle]:branch:_hg_branches' \
560 '*'{-r+,--rev=}'[a changeset intended to be added to the destination]:revision:_hg_labels' \ 560 '*'{-r+,--rev=}'[a changeset intended to be added to the destination]:revision:_hg_labels' \
561 '--all[bundle all changesets in the repository]' \ 561 '(--all -a)'{-a,--all}'[bundle all changesets in the repository]' \
562 '--type[bundle compression type to use (default: bzip2)]:bundle type' \ 562 '--type[bundle compression type to use (default: bzip2)]:bundle type' \
563 ':output file:_files' \ 563 ':output file:_files' \
564 ':destination repository:_files -/' 564 ':destination repository:_files -/'
565 } 565 }
566 566
567 _hg_cmd_cat() { 567 _hg_cmd_cat() {
568 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \ 568 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \
569 '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:format string' \ 569 '(--output -o)'{-o+,--output=}'[print output to file with formatted name]:format string' \
570 '(--rev -r)'{-r+,--rev=}'[revision]:revision:_hg_labels' \ 570 '(--rev -r)'{-r+,--rev=}'[print the given revision]:revision:_hg_labels' \
571 '--decode[apply any matching decode filter]' \ 571 '--decode[apply any matching decode filter]' \
572 '*:file:_hg_files' 572 '*:file:_hg_files'
573 } 573 }
574 574
575 _hg_cmd_clone() { 575 _hg_cmd_clone() {
576 _arguments -s -S : $_hg_global_opts $_hg_clone_opts \ 576 _arguments -s -S : $_hg_global_opts $_hg_clone_opts \
577 '*'{-r+,--rev=}'[do not clone everything, but include this changeset and its ancestors]:revision' \ 577 '*'{-r+,--rev=}'[do not clone everything, but include this changeset and its ancestors]:revision' \
578 '(--updaterev -u)'{-u+,--updaterev=}'[revision, tag or branch to check out]:revision' \ 578 '(--updaterev -u)'{-u+,--updaterev=}'[revision, tag, or branch to check out]:revision' \
579 '*'{-b+,--branch=}"[do not clone everything, but include this branch's changesets and their ancestors]:branch" \ 579 '*'{-b+,--branch=}"[do not clone everything, but include this branch's changesets and their ancestors]:branch" \
580 ':source repository:_hg_remote' \ 580 ':source repository:_hg_remote' \
581 ':destination:_hg_clone_dest' 581 ':destination:_hg_clone_dest'
582 } 582 }
583 583
640 '*:revision:_hg_labels' 640 '*:revision:_hg_labels'
641 } 641 }
642 642
643 _hg_cmd_files() { 643 _hg_cmd_files() {
644 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \ 644 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
645 '(--rev -r)'{-r+,--rev=}'[search the repository as it is in REV]:revision:_hg_labels' \ 645 '(--rev -r)'{-r+,--rev=}'[search the repository as it is in revision]:revision:_hg_labels' \
646 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ 646 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
647 '*:file:_hg_files' 647 '*:file:_hg_files'
648 } 648 }
649 649
650 _hg_cmd_forget() { 650 _hg_cmd_forget() {
664 '*:revision:_hg_labels' 664 '*:revision:_hg_labels'
665 } 665 }
666 666
667 _hg_cmd_grep() { 667 _hg_cmd_grep() {
668 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \ 668 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \
669 '(--print0 -0)'{-0,--print0}'[end filenames with NUL]' \ 669 '(--print0 -0)'{-0,--print0}'[end fields with NUL]' \
670 '--all[print all revisions with matches]' \ 670 '--all[print all revisions with matches]' \
671 '(--follow -f)'{-f,--follow}'[follow changeset or file history]' \ 671 '(--follow -f)'{-f,--follow}'[follow changeset history, or file history across copies and renames]' \
672 '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \ 672 '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \
673 '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revs that match]' \ 673 '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revisions that match]' \
674 '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \ 674 '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \
675 '*'{-r+,--rev=}'[search in given revision range]:revision:_hg_revrange' \ 675 '*'{-r+,--rev=}'[only search files changed within revision range]:revision:_hg_revrange' \
676 '(--user -u)'{-u,--user}'[print user who committed change]' \ 676 '(--user -u)'{-u,--user}'[list the author (long with -v)]' \
677 '(--date -d)'{-d,--date}'[print date of a changeset]' \ 677 '(--date -d)'{-d,--date}'[list the date (short with -q)]' \
678 '1:search pattern:' \ 678 '1:search pattern:' \
679 '*:files:_hg_files' 679 '*:files:_hg_files'
680 } 680 }
681 681
682 _hg_cmd_heads() { 682 _hg_cmd_heads() {
683 _arguments -s -S : $_hg_global_opts $_hg_template_opts \ 683 _arguments -s -S : $_hg_global_opts $_hg_template_opts \
684 '(--topo -t)'{-t,--topo}'[show topological heads only]' \ 684 '(--topo -t)'{-t,--topo}'[show topological heads only]' \
685 '(--closed -c)'{-c,--closed}'[show normal and closed branch heads]' \ 685 '(--closed -c)'{-c,--closed}'[show normal and closed branch heads]' \
686 '(--rev -r)'{-r+,--rev=}'[show only heads which are descendants of rev]:revision:_hg_labels' 686 '(--rev -r)'{-r+,--rev=}'[show only heads which are descendants of revision]:revision:_hg_labels'
687 } 687 }
688 688
689 _hg_cmd_help() { 689 _hg_cmd_help() {
690 _arguments -s -S : $_hg_global_opts \ 690 _arguments -s -S : $_hg_global_opts \
691 '(--extension -e)'{-e,--extension}'[show only help for extensions]' \ 691 '(--extension -e)'{-e,--extension}'[show only help for extensions]' \
694 '*:mercurial help topic:_hg_help_topics' 694 '*:mercurial help topic:_hg_help_topics'
695 } 695 }
696 696
697 _hg_cmd_identify() { 697 _hg_cmd_identify() {
698 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \ 698 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \
699 '(--rev -r)'{-r+,--rev=}'[identify the specified rev]:revision:_hg_labels' \ 699 '(--rev -r)'{-r+,--rev=}'[identify the specified revision]:revision:_hg_labels' \
700 '(--num -n)'{-n,--num}'[show local revision number]' \ 700 '(--num -n)'{-n,--num}'[show local revision number]' \
701 '(--id -i)'{-i,--id}'[show global revision id]' \ 701 '(--id -i)'{-i,--id}'[show global revision id]' \
702 '(--branch -b)'{-b,--branch}'[show branch]' \ 702 '(--branch -b)'{-b,--branch}'[show branch]' \
703 '(--bookmarks -B)'{-B,--bookmarks}'[show bookmarks]' \ 703 '(--bookmarks -B)'{-B,--bookmarks}'[show bookmarks]' \
704 '(--tags -t)'{-t,--tags}'[show tags]' 704 '(--tags -t)'{-t,--tags}'[show tags]'
720 } 720 }
721 721
722 _hg_cmd_incoming() { 722 _hg_cmd_incoming() {
723 _arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \ 723 _arguments -s -S : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
724 $_hg_subrepos_opts \ 724 $_hg_subrepos_opts \
725 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ 725 '(--force -f)'{-f,--force}'[run even if remote repository is unrelated]' \
726 '*'{-r+,--rev=}'[a remote changeset intended to be added]:revision:_hg_labels' \ 726 '*'{-r+,--rev=}'[a remote changeset intended to be added]:revision:_hg_labels' \
727 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ 727 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
728 '--bundle[file to store the bundles into]:bundle file:_files' \ 728 '--bundle=[file to store the bundles into]:bundle file:_files' \
729 ':source:_hg_remote' 729 ':source:_hg_remote'
730 } 730 }
731 731
732 _hg_cmd_init() { 732 _hg_cmd_init() {
733 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \ 733 _arguments -s -S : $_hg_global_opts $_hg_remote_opts \
734 ':dir:_files -/' 734 ':directory:_files -/'
735 } 735 }
736 736
737 _hg_cmd_locate() { 737 _hg_cmd_locate() {
738 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \ 738 _arguments -s -S : $_hg_global_opts $_hg_pat_opts \
739 '(--rev -r)'{-r+,--rev=}'[search repository as it stood at revision]:revision:_hg_labels' \ 739 '(--rev -r)'{-r+,--rev=}'[search the repository as it is in revision]:revision:_hg_labels' \
740 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ 740 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
741 '(--fullpath -f)'{-f,--fullpath}'[print complete paths from the filesystem root]' \ 741 '(--fullpath -f)'{-f,--fullpath}'[print complete paths from the filesystem root]' \
742 '*:search pattern:_hg_files' 742 '*:search pattern:_hg_files'
743 } 743 }
744 744
745 _hg_cmd_log() { 745 _hg_cmd_log() {
746 _arguments -s -S : $_hg_log_opts $_hg_pat_opts \ 746 _arguments -s -S : $_hg_log_opts $_hg_pat_opts \
747 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \ 747 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset history, or file history across copies and renames]' \
748 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \ 748 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \
749 '(--copies -C)'{-C,--copies}'[show copied files]' \ 749 '(--copies -C)'{-C,--copies}'[show copied files]' \
750 '*'{-k+,--keyword=}'[search for a keyword]:keyword' \ 750 '*'{-k+,--keyword=}'[search for a keyword]:keyword' \
751 '*'{-r+,--rev=}'[show the specified revision or revset]:revision:_hg_revrange' \ 751 '*'{-r+,--rev=}'[show the specified revision or revset]:revision:_hg_revrange' \
752 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ 752 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \
781 ':destination:_hg_remote' 781 ':destination:_hg_remote'
782 } 782 }
783 783
784 _hg_cmd_parents() { 784 _hg_cmd_parents() {
785 _arguments -s -S : $_hg_global_opts $_hg_template_opts \ 785 _arguments -s -S : $_hg_global_opts $_hg_template_opts \
786 '(--rev -r)'{-r+,--rev=}'[show parents of the specified rev]:revision:_hg_labels' \ 786 '(--rev -r)'{-r+,--rev=}'[show parents of the specified revision]:revision:_hg_labels' \
787 ':last modified file:_hg_files' 787 ':last modified file:_hg_files'
788 } 788 }
789 789
790 _hg_cmd_paths() { 790 _hg_cmd_paths() {
791 _arguments -s -S : $_hg_global_opts \ 791 _arguments -s -S : $_hg_global_opts \
857 local context state state_descr line ret=1 857 local context state state_descr line ret=1
858 typeset -A opt_args 858 typeset -A opt_args
859 859
860 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ 860 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
861 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \ 861 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
862 '(--rev -r)'{-r+,--rev=}'[revision to revert to]:revision:_hg_labels' \ 862 '(--rev -r)'{-r+,--rev=}'[revert to the specified revision]:revision:_hg_labels' \
863 '(--no-backup -C)'{-C,--no-backup}'[do not save backup copies of files]' \ 863 '(--no-backup -C)'{-C,--no-backup}'[do not save backup copies of files]' \
864 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date' \ 864 '(--date -d)'{-d+,--date=}'[tipmost revision matching date]:date' \
865 '(--interactive -i)'{-i,--interactive}'[interactively select the changes]' \ 865 '(--interactive -i)'{-i,--interactive}'[interactively select the changes]' \
866 '*:file:->revert_files' && ret=0 866 '*:file:->revert_files' && ret=0
867 867
921 '(--added -a)'{-a,--added}'[show only added files]' \ 921 '(--added -a)'{-a,--added}'[show only added files]' \
922 '(--removed -r)'{-r,--removed}'[show only removed files]' \ 922 '(--removed -r)'{-r,--removed}'[show only removed files]' \
923 '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \ 923 '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \
924 '(--clean -c)'{-c,--clean}'[show only files without changes]' \ 924 '(--clean -c)'{-c,--clean}'[show only files without changes]' \
925 '(--unknown -u)'{-u,--unknown}'[show only unknown (not tracked) files]' \ 925 '(--unknown -u)'{-u,--unknown}'[show only unknown (not tracked) files]' \
926 '(--ignored -i)'{-i,--ignored}'[show ignored files]' \ 926 '(--ignored -i)'{-i,--ignored}'[show only ignored files]' \
927 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \ 927 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \
928 '(--copies -C)'{-C,--copies}'[show source of copied files]' \ 928 '(--copies -C)'{-C,--copies}'[show source of copied files]' \
929 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ 929 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
930 '*--rev=[show difference from revision]:revision:_hg_labels' \ 930 '*--rev=[show difference from revision]:revision:_hg_labels' \
931 '--change=[list the changed files of a revision]:revision:_hg_labels' \ 931 '--change=[list the changed files of a revision]:revision:_hg_labels' \
955 '(--patch -p)'{-p,--patch}'[show patch]' 955 '(--patch -p)'{-p,--patch}'[show patch]'
956 } 956 }
957 957
958 _hg_cmd_unbundle() { 958 _hg_cmd_unbundle() {
959 _arguments -s -S : $_hg_global_opts \ 959 _arguments -s -S : $_hg_global_opts \
960 '(--update -u)'{-u,--update}'[update to new tip if changesets were unbundled]' \ 960 '(--update -u)'{-u,--update}'[update to new branch head if changesets were unbundled]' \
961 '*:files:_files' 961 '*:files:_files'
962 } 962 }
963 963
964 _hg_cmd_update() { 964 _hg_cmd_update() {
965 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts \ 965 _arguments -s -S : $_hg_global_opts $_hg_mergetool_opts \
1089 ':patch:_hg_qseries' 1089 ':patch:_hg_qseries'
1090 } 1090 }
1091 1091
1092 _hg_cmd_qimport() { 1092 _hg_cmd_qimport() {
1093 _arguments -s -S : $_hg_global_opts $_hg_gitlike_opts \ 1093 _arguments -s -S : $_hg_global_opts $_hg_gitlike_opts \
1094 '(--existing -e)'{-e,--existing}'[import file in patch dir]' \ 1094 '(--existing -e)'{-e,--existing}'[import file in patch directory]' \
1095 '(--name -n 2)'{-n+,--name}'[patch file name]:name' \ 1095 '(--name -n 2)'{-n+,--name=}'[name of patch file]:name' \
1096 '(--force -f)'{-f,--force}'[overwrite existing files]' \ 1096 '(--force -f)'{-f,--force}'[overwrite existing files]' \
1097 '*'{-r+,--rev=}'[place existing revisions under mq control]:revision:_hg_revrange' \ 1097 '*'{-r+,--rev=}'[place existing revisions under mq control]:revision:_hg_revrange' \
1098 '(--push -P)'{-P,--push}'[qpush after importing]' \ 1098 '(--push -P)'{-P,--push}'[qpush after importing]' \
1099 '*:patch:_files' 1099 '*:patch:_files'
1100 } 1100 }
1109 } 1109 }
1110 1110
1111 _hg_cmd_qpop() { 1111 _hg_cmd_qpop() {
1112 _arguments -s -S : $_hg_global_opts \ 1112 _arguments -s -S : $_hg_global_opts \
1113 '(--all -a :)'{-a,--all}'[pop all patches]' \ 1113 '(--all -a :)'{-a,--all}'[pop all patches]' \
1114 '(--force -f)'{-f,--force}'[forget any local changes]' \ 1114 '(--force -f)'{-f,--force}'[forget any local changes to patched files]' \
1115 '--keep-changes[tolerate non-conflicting local changes]' \ 1115 '--keep-changes[tolerate non-conflicting local changes]' \
1116 '--no-backup[do not save backup copies of files]' \ 1116 '--no-backup[do not save backup copies of files]' \
1117 ':patch:_hg_qapplied' 1117 ':patch:_hg_qapplied'
1118 } 1118 }
1119 1119
1123 1123
1124 _hg_cmd_qpush() { 1124 _hg_cmd_qpush() {
1125 _arguments -s -S : $_hg_global_opts \ 1125 _arguments -s -S : $_hg_global_opts \
1126 '(--all -a :)'{-a,--all}'[apply all patches]' \ 1126 '(--all -a :)'{-a,--all}'[apply all patches]' \
1127 '(--list -l)'{-l,--list}'[list patch name in commit text]' \ 1127 '(--list -l)'{-l,--list}'[list patch name in commit text]' \
1128 '(--force -f)'{-f,--force}'[apply if the patch has rejects]' \ 1128 '(--force -f)'{-f,--force}'[apply on top of local changes]' \
1129 '(--exact -e)'{-e,--exact}'[apply the target patch to its recorded parent]' \ 1129 '(--exact -e)'{-e,--exact}'[apply the target patch to its recorded parent]' \
1130 '--move[reorder patch series and apply only the patch]' \ 1130 '--move[reorder patch series and apply only the patch]' \
1131 '--keep-changes[tolerate non-conflicting local changes]' \ 1131 '--keep-changes[tolerate non-conflicting local changes]' \
1132 '--no-backup[do not save backup copies of files]' \ 1132 '--no-backup[do not save backup copies of files]' \
1133 ':patch:_hg_qunapplied' 1133 ':patch:_hg_qunapplied'
1134 } 1134 }
1135 1135
1136 _hg_cmd_qrefresh() { 1136 _hg_cmd_qrefresh() {
1137 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \ 1137 _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \
1138 '(--short -s)'{-s,--short}'[short refresh]' \ 1138 '(--short -s)'{-s,--short}'[refresh only files already in the patch and specified files]' \
1139 '*:files:_hg_files' 1139 '*:files:_hg_files'
1140 } 1140 }
1141 1141
1142 _hg_cmd_qrename() { 1142 _hg_cmd_qrename() {
1143 _arguments -s -S : $_hg_global_opts \ 1143 _arguments -s -S : $_hg_global_opts \
1148 _hg_cmd_qselect() { 1148 _hg_cmd_qselect() {
1149 _arguments -s -S : $_hg_global_opts \ 1149 _arguments -s -S : $_hg_global_opts \
1150 '(--none -n :)'{-n,--none}'[disable all guards]' \ 1150 '(--none -n :)'{-n,--none}'[disable all guards]' \
1151 '(--series -s :)'{-s,--series}'[list all guards in series file]' \ 1151 '(--series -s :)'{-s,--series}'[list all guards in series file]' \
1152 '--pop[pop to before first guarded applied patch]' \ 1152 '--pop[pop to before first guarded applied patch]' \
1153 '--reapply[pop and reapply patches]' \ 1153 '--reapply[pop, then reapply patches]' \
1154 '*:guards:_hg_qguards' 1154 '*:guards:_hg_qguards'
1155 } 1155 }
1156 1156
1157 _hg_cmd_qseries() { 1157 _hg_cmd_qseries() {
1158 _arguments -s -S : $_hg_global_opts $_hg_qseries_opts \ 1158 _arguments -s -S : $_hg_global_opts $_hg_qseries_opts \
1169 } 1169 }
1170 1170
1171 _hg_cmd_strip() { 1171 _hg_cmd_strip() {
1172 _arguments -s -S : $_hg_global_opts \ 1172 _arguments -s -S : $_hg_global_opts \
1173 '(--force -f)'{-f,--force}'[force removal of changesets, discard uncommitted changes (no backup)]' \ 1173 '(--force -f)'{-f,--force}'[force removal of changesets, discard uncommitted changes (no backup)]' \
1174 '--no-backup[no backups]' \ 1174 '--no-backup[do not save backup bundle]' \
1175 '(--keep -k)'{-k,--keep}'[do not modify working directory during strip]' \ 1175 '(--keep -k)'{-k,--keep}'[do not modify working directory during strip]' \
1176 '*'{-B+,--bookmark=}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \ 1176 '*'{-B+,--bookmark=}'[remove revisions only reachable from given bookmark]:bookmark:_hg_bookmarks' \
1177 '*'{-r+,--rev=}'[revision]:revision:_hg_labels' \ 1177 '*'{-r+,--rev=}'[strip specified revision]:revision:_hg_labels' \
1178 '*:revision:_hg_labels' 1178 '*:revision:_hg_labels'
1179 } 1179 }
1180 1180
1181 # Patchbomb 1181 # Patchbomb
1182 _hg_cmd_email() { 1182 _hg_cmd_email() {
1183 _arguments -s -S : $_hg_global_opts $_hg_remote_opts $_hg_gitlike_opts \ 1183 _arguments -s -S : $_hg_global_opts $_hg_remote_opts $_hg_gitlike_opts \
1184 '--plain[omit hg patch header]' \ 1184 '--plain[omit hg patch header]' \
1185 '--body[send patches as inline message text (default)]' \ 1185 '--body[send patches as inline message text (default)]' \
1186 '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \ 1186 '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \
1187 '(--bundle -b)'{-b,--bundle}'[send changes not in target as a binary bundle]' \ 1187 '(--bundle -b)'{-b,--bundle}'[send changes not in target as a binary bundle]' \
1188 '--bundlename[name of the bundle attachment file (default: bundle)]:' \ 1188 '--bundlename=[name of the bundle attachment file (default: bundle)]:name' \
1189 '*'{-r+,--rev=}'[search in given revision range]:revision:_hg_revrange' \ 1189 '*'{-r+,--rev=}'[a revision to send]:revision:_hg_revrange' \
1190 '--force[run even when remote repository is unrelated (with -b/--bundle)]' \ 1190 '--force[run even when remote repository is unrelated (with -b/--bundle)]' \
1191 '*--base=[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \ 1191 '*--base=[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \
1192 '--intro[send an introduction email for a single patch]' \ 1192 '--intro[send an introduction email for a single patch]' \
1193 '(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \ 1193 '(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \
1194 '(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \ 1194 '(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \
1241 # Convert 1241 # Convert
1242 _hg_cmd_convert() { 1242 _hg_cmd_convert() {
1243 _arguments -s -S : $_hg_global_opts \ 1243 _arguments -s -S : $_hg_global_opts \
1244 '(--source-type -s)'{-s+,--source-type=}'[source repository type]:type:(hg cvs darcs git svn mtn gnuarch bzr p4)' \ 1244 '(--source-type -s)'{-s+,--source-type=}'[source repository type]:type:(hg cvs darcs git svn mtn gnuarch bzr p4)' \
1245 '(--dest-type -d)'{-d+,--dest-type=}'[destination repository type]:type:(hg svn)' \ 1245 '(--dest-type -d)'{-d+,--dest-type=}'[destination repository type]:type:(hg svn)' \
1246 '*'{-r+,--rev=}'[import up to target revision]:revision' \ 1246 '*'{-r+,--rev=}'[import up to source revision]:revision' \
1247 '(--authormap -A)'{-A+,--authormap=}'[remap usernames using this file]:file:_files' \ 1247 '(--authormap -A)'{-A+,--authormap=}'[remap usernames using this file]:file:_files' \
1248 '--filemap=[remap file names using contents of file]:file:_files' \ 1248 '--filemap=[remap file names using contents of file]:file:_files' \
1249 '--full[apply filemap changes by converting all files again]' \ 1249 '--full[apply filemap changes by converting all files again]' \
1250 '--splicemap=[splice synthesized history into place]:file:_files' \ 1250 '--splicemap=[splice synthesized history into place]:file:_files' \
1251 '--branchmap=[change branch names while converting]:file:_files' \ 1251 '--branchmap=[change branch names while converting]:file:_files' \