Show More
@@ -13,6 +13,9 | |||||
13 | # option) any later version. |
|
13 | # option) any later version. | |
14 | # |
|
14 | # | |
15 |
|
15 | |||
|
16 | emulate -LR zsh | |||
|
17 | setopt extendedglob | |||
|
18 | ||||
16 | local curcontext="$curcontext" state line |
|
19 | local curcontext="$curcontext" state line | |
17 | typeset -A _hg_cmd_globals |
|
20 | typeset -A _hg_cmd_globals | |
18 |
|
21 | |||
@@ -153,9 +156,9 typeset -A _hg_cmd_globals | |||||
153 | typeset -a tags |
|
156 | typeset -a tags | |
154 | local tag rev |
|
157 | local tag rev | |
155 |
|
158 | |||
156 |
_hg_cmd tags 2> /dev/null | while read tag |
|
159 | _hg_cmd tags 2> /dev/null | while read tag | |
157 | do |
|
160 | do | |
158 | tags+=($tag) |
|
161 | tags+=(${tag/ # [0-9]#:*}) | |
159 | done |
|
162 | done | |
160 | (( $#tags )) && _describe -t tags 'tags' tags |
|
163 | (( $#tags )) && _describe -t tags 'tags' tags | |
161 | } |
|
164 | } | |
@@ -674,13 +677,13 typeset -A _hg_cmd_globals | |||||
674 | # MQ |
|
677 | # MQ | |
675 | _hg_qseries() { |
|
678 | _hg_qseries() { | |
676 | typeset -a patches |
|
679 | typeset -a patches | |
677 | patches=($(_hg_cmd qseries 2>/dev/null)) |
|
680 | patches=(${(f)"$(_hg_cmd qseries 2>/dev/null)"}) | |
678 | (( $#patches )) && _describe -t hg-patches 'patches' patches |
|
681 | (( $#patches )) && _describe -t hg-patches 'patches' patches | |
679 | } |
|
682 | } | |
680 |
|
683 | |||
681 | _hg_qapplied() { |
|
684 | _hg_qapplied() { | |
682 | typeset -a patches |
|
685 | typeset -a patches | |
683 | patches=($(_hg_cmd qapplied 2>/dev/null)) |
|
686 | patches=(${(f)"$(_hg_cmd qapplied 2>/dev/null)"}) | |
684 | if (( $#patches )) |
|
687 | if (( $#patches )) | |
685 | then |
|
688 | then | |
686 | patches+=(qbase qtip) |
|
689 | patches+=(qbase qtip) | |
@@ -690,7 +693,7 typeset -A _hg_cmd_globals | |||||
690 |
|
693 | |||
691 | _hg_qunapplied() { |
|
694 | _hg_qunapplied() { | |
692 | typeset -a patches |
|
695 | typeset -a patches | |
693 | patches=($(_hg_cmd qunapplied 2>/dev/null)) |
|
696 | patches=(${(f)"$(_hg_cmd qunapplied 2>/dev/null)"}) | |
694 | (( $#patches )) && _describe -t hg-unapplied-patches 'unapplied patches' patches |
|
697 | (( $#patches )) && _describe -t hg-unapplied-patches 'unapplied patches' patches | |
695 | } |
|
698 | } | |
696 |
|
699 | |||
@@ -730,6 +733,12 typeset -A _hg_cmd_globals | |||||
730 | '*:unapplied patch:_hg_qunapplied' |
|
733 | '*:unapplied patch:_hg_qunapplied' | |
731 | } |
|
734 | } | |
732 |
|
735 | |||
|
736 | _hg_cmd_qgoto() { | |||
|
737 | _arguments -s -w : $_hg_global_opts \ | |||
|
738 | '(--force -f)'{-f,--force}'[overwrite any local changes]' \ | |||
|
739 | ':patch:_hg_qseries' | |||
|
740 | } | |||
|
741 | ||||
733 | _hg_cmd_qguard() { |
|
742 | _hg_cmd_qguard() { | |
734 | _arguments -s -w : $_hg_global_opts \ |
|
743 | _arguments -s -w : $_hg_global_opts \ | |
735 | '(--list -l)'{-l,--list}'[list all patches and guards]' \ |
|
744 | '(--list -l)'{-l,--list}'[list all patches and guards]' \ |
General Comments 0
You need to be logged in to leave comments.
Login now