Mercurial > hg > mercurial-crew-with-dirclash
annotate contrib/zsh_completion @ 3543:f7dee427cd14
Turn of "Not trusting file" logging when running hgweb and hgwebdir
(hg serve still shows the warning)
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 26 Oct 2006 19:25:45 +0200 |
parents | ef80b13df85a |
children | 733835602365 |
rev | line source |
---|---|
1362 | 1 #compdef hg |
2 | |
3 # Zsh completion script for mercurial. Rename this file to _hg and copy | |
4 # it into your zsh function path (/usr/share/zsh/site-functions for | |
5 # instance) | |
6 # | |
7 # Copyright (C) 2005 Steve Borho | |
3534
811e6c95485c
zsh: use standard tags where possible
Brendan Cully <brendan@kublai.com>
parents:
3529
diff
changeset
|
8 # Copyright (C) 2006 Brendan Cully <brendan@kublai.com> |
1362 | 9 # |
10 # This is free software; you can redistribute it and/or modify it under | |
11 # the terms of the GNU General Public License as published by the Free | |
12 # Software Foundation; either version 2 of the License, or (at your | |
13 # option) any later version. | |
14 # | |
15 | |
16 local curcontext="$curcontext" state line | |
3511 | 17 typeset -A _hg_cmd_globals |
18 | |
19 _hg() { | |
20 local cmd | |
21 integer i=2 | |
22 _hg_cmd_globals=() | |
23 | |
24 while (( i < $#words )) | |
25 do | |
26 case "$words[$i]" in | |
27 -R|--repository|--cwd|--config) | |
28 # pass along arguments to hg completer | |
29 _hg_cmd_globals+="$words[$i]" | |
30 _hg_cmd_globals+="$words[$i+1]" | |
31 (( i += 2 )) | |
32 continue | |
33 ;; | |
34 -R*) | |
35 _hg_cmd_globals+="$words[$i]" | |
36 (( i++ )) | |
37 continue | |
38 ;; | |
39 -*) | |
40 # skip option | |
41 (( i++ )) | |
42 continue | |
43 ;; | |
44 esac | |
45 if [[ -z "$cmd" ]] | |
46 then | |
47 cmd="$words[$i]" | |
48 words[$i]=() | |
49 (( CURRENT-- )) | |
50 fi | |
51 (( i++ )) | |
52 done | |
53 | |
54 if [[ -z "$cmd" ]] | |
55 then | |
56 _arguments -s -w : $_hg_global_opts \ | |
57 ':mercurial command:_hg_commands' | |
58 return | |
59 fi | |
60 | |
61 # resolve abbreviations and aliases | |
62 if ! (( $+functions[_hg_cmd_${cmd}] )) | |
63 then | |
64 local cmdexp | |
65 (( $#_hg_cmd_list )) || _hg_get_commands | |
66 | |
67 cmdexp=$_hg_cmd_list[(r)${cmd}*] | |
68 if [[ $cmdexp == $_hg_cmd_list[(R)${cmd}*] ]] | |
69 then | |
70 # might be nice to rewrite the command line with the expansion | |
71 cmd="$cmdexp" | |
72 fi | |
73 if [[ -n $_hg_alias_list[$cmd] ]] | |
74 then | |
75 cmd=$_hg_alias_list[$cmd] | |
76 fi | |
77 fi | |
78 | |
79 if (( $+functions[_hg_cmd_${cmd}] )) | |
80 then | |
81 curcontext="${curcontext%:*:*}:hg-${cmd}:" | |
82 _hg_cmd_${cmd} | |
83 return | |
84 fi | |
85 } | |
3491
459e7cd943d4
zsh: complete according to the -R option if specified
Brendan Cully <brendan@kublai.com>
parents:
3490
diff
changeset
|
86 |
3511 | 87 _hg_get_commands() { |
88 typeset -ga _hg_cmd_list | |
89 typeset -gA _hg_alias_list | |
90 local hline cmd cmdalias | |
91 _call_program help hg --verbose help | while read -A hline | |
92 do | |
93 cmd="$hline[1]" | |
94 case $cmd in | |
95 *:) | |
96 cmd=${cmd%:} | |
97 _hg_cmd_list+=($cmd) | |
98 ;; | |
99 *,) | |
100 cmd=${cmd%,} | |
101 _hg_cmd_list+=($cmd) | |
102 integer i=2 | |
103 while (( i <= $#hline )) | |
104 do | |
105 cmdalias=${hline[$i]%(:|,)} | |
106 _hg_cmd_list+=($cmdalias) | |
107 _hg_alias_list+=($cmdalias $cmd) | |
108 (( i++ )) | |
109 done | |
110 ;; | |
111 esac | |
112 done | |
113 } | |
114 | |
115 _hg_commands() { | |
116 (( $#_hg_cmd_list )) || _hg_get_commands | |
3534
811e6c95485c
zsh: use standard tags where possible
Brendan Cully <brendan@kublai.com>
parents:
3529
diff
changeset
|
117 _describe -t commands 'mercurial command' _hg_cmd_list |
3511 | 118 } |
119 | |
3536
ef80b13df85a
zsh: add revrange completion
Brendan Cully <brendan@kublai.com>
parents:
3535
diff
changeset
|
120 _hg_revrange() { |
ef80b13df85a
zsh: add revrange completion
Brendan Cully <brendan@kublai.com>
parents:
3535
diff
changeset
|
121 compset -P 1 '*:' |
ef80b13df85a
zsh: add revrange completion
Brendan Cully <brendan@kublai.com>
parents:
3535
diff
changeset
|
122 _hg_tags "$@" |
ef80b13df85a
zsh: add revrange completion
Brendan Cully <brendan@kublai.com>
parents:
3535
diff
changeset
|
123 } |
ef80b13df85a
zsh: add revrange completion
Brendan Cully <brendan@kublai.com>
parents:
3535
diff
changeset
|
124 |
3511 | 125 _hg_tags() { |
126 typeset -a tags | |
127 local tag rev | |
128 | |
129 _hg_cmd tags 2> /dev/null | while read tag rev | |
130 do | |
131 tags+=($tag) | |
132 done | |
3534
811e6c95485c
zsh: use standard tags where possible
Brendan Cully <brendan@kublai.com>
parents:
3529
diff
changeset
|
133 (( $#tags )) && _describe -t tags 'tags' tags |
3511 | 134 } |
135 | |
136 _hg_status() { | |
137 status_files=(${(ps:\0:)"$(_hg_cmd status -0n$1 .)"}) | |
138 } | |
3482
46958e428fcd
zsh completion: basic mq support
Brendan Cully <brendan@kublai.com>
parents:
1544
diff
changeset
|
139 |
3511 | 140 _hg_unknown() { |
141 typeset -a status_files | |
142 _hg_status u | |
3534
811e6c95485c
zsh: use standard tags where possible
Brendan Cully <brendan@kublai.com>
parents:
3529
diff
changeset
|
143 (( $#status_files )) && _describe -t files 'unknown files' status_files |
3511 | 144 } |
145 | |
146 _hg_missing() { | |
147 typeset -a status_files | |
148 _hg_status d | |
3534
811e6c95485c
zsh: use standard tags where possible
Brendan Cully <brendan@kublai.com>
parents:
3529
diff
changeset
|
149 (( $#status_files )) && _describe -t files 'missing files' status_files |
3511 | 150 } |
151 | |
152 _hg_addremove() { | |
3534
811e6c95485c
zsh: use standard tags where possible
Brendan Cully <brendan@kublai.com>
parents:
3529
diff
changeset
|
153 _alternative 'files:unknown files:_hg_unknown' \ |
811e6c95485c
zsh: use standard tags where possible
Brendan Cully <brendan@kublai.com>
parents:
3529
diff
changeset
|
154 'files:missing files:_hg_missing' |
3511 | 155 } |
156 | |
157 _hg_paths() { | |
158 typeset -a paths pnames | |
159 _hg_cmd paths 2> /dev/null | while read -A pnames | |
160 do | |
161 paths+=($pnames[1]) | |
162 done | |
3534
811e6c95485c
zsh: use standard tags where possible
Brendan Cully <brendan@kublai.com>
parents:
3529
diff
changeset
|
163 (( $#paths )) && _describe -t urls 'repository aliases' paths |
3511 | 164 } |
165 | |
166 _hg_remote() { | |
3534
811e6c95485c
zsh: use standard tags where possible
Brendan Cully <brendan@kublai.com>
parents:
3529
diff
changeset
|
167 _alternative 'urls:repository alias:_hg_paths' \ |
811e6c95485c
zsh: use standard tags where possible
Brendan Cully <brendan@kublai.com>
parents:
3529
diff
changeset
|
168 'directories:directory:_files -/' |
3511 | 169 } |
170 | |
171 # Common options | |
172 _hg_global_opts=( | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
173 '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/' |
3511 | 174 '--cwd[change working directory]:new working directory:_files -/' |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
175 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, assume yes for any required answers]' |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
176 '(--verbose -v)'{-v,--verbose}'[enable additional output]' |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
177 '(--quiet -q)'{-q,--quiet}'[suppress output]' |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
178 '(--help -h)'{-h,--help}'[display help and exit]' |
3511 | 179 '--debug[debug mode]' |
180 '--debugger[start debugger]' | |
181 '--traceback[print traceback on exception]' | |
182 '--time[time how long the command takes]' | |
183 '--profile[profile]' | |
184 '--version[output version information and exit]' | |
185 ) | |
186 | |
187 _hg_pat_opts=( | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
188 '*'{-I+,--include}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/' |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
189 '*'{-X+,--exclude}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/') |
3511 | 190 |
191 _hg_diff_opts=( | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
192 '(--text -a)'{-a,--text}'[treat all files as text]' |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
193 '(--git -g)'{-g,--git}'[use git extended diff format]' |
3511 | 194 "--nodates[don't include dates in diff headers]") |
195 | |
196 _hg_dryrun_opts=( | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
197 '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]') |
3511 | 198 |
199 _hg_style_opts=( | |
200 '--style[display using template map file]:' | |
201 '--template[display with template]:') | |
202 | |
203 _hg_commit_opts=( | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
204 '(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]' |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
205 '(-e --edit -l --logfile --message -m)'{-m+,--message}'[use <text> as commit message]:message:' |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
206 '(-e --edit -m --message --logfile -l)'{-l+,--logfile}'[read the commit message from <file>]:log file:_files') |
3511 | 207 |
208 _hg_remote_opts=( | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
209 '(--ssh -e)'{-e+,--ssh}'[specify ssh command to use]:' |
3511 | 210 '--remotecmd[specify hg command to run on the remote side]:') |
211 | |
212 _hg_cmd() { | |
213 _call_program hg hg "$_hg_cmd_globals[@]" "$@" | |
214 } | |
215 | |
216 _hg_cmd_add() { | |
217 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | |
218 '*:unknown files:_hg_unknown' | |
219 } | |
220 | |
221 _hg_cmd_addremove() { | |
222 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
223 '(--similarity -s)'{-s+,--similarity}'[guess renamed files by similarity (0<=s<=100)]:' \ |
3511 | 224 '*:unknown or missing files:_hg_addremove' |
225 } | |
226 | |
227 _hg_cmd_annotate() { | |
228 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
229 '(--rev -r)'{-r+,--rev}'[annotate the specified revision]:revision:_hg_tags' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
230 '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
231 '(--text -a)'{-a,--text}'[treat all files as text]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
232 '(--user -u)'{-u,--user}'[list the author]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
233 '(--date -d)'{-d,--date}'[list the date]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
234 '(--number -n)'{-n,--number}'[list the revision number (default)]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
235 '(--changeset -c)'{-c,--changeset}'[list the changeset]' \ |
3511 | 236 '*:files:_files -W $(_hg_cmd root)' |
237 } | |
238 | |
239 _hg_cmd_archive() { | |
240 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | |
241 '--no-decode[do not pass files through decoders]' \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
242 '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
243 '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_tags' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
244 '(--type -t)'{-t+,--type}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \ |
3511 | 245 '*:destination:_files' |
246 } | |
247 | |
248 _hg_cmd_bundle() { | |
249 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
250 '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \ |
3511 | 251 '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_tags' \ |
252 ':output file:_files' \ | |
253 ':destination repository:_files -/' | |
254 } | |
255 | |
256 _hg_cmd_cat() { | |
257 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
258 '(--output -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
259 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \ |
3511 | 260 '*:file:_files -W $(_hg_cmd root)' |
261 } | |
262 | |
263 _hg_cmd_clone() { | |
264 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
265 '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
266 '(--rev -r)'{-r+,--rev}'[a changeset you would like to have after cloning]:' \ |
3511 | 267 '--uncompressed[use uncompressed transfer (fast over LAN)]' \ |
268 ':source repository:_hg_remote' \ | |
269 ':destination:_files -/' | |
270 } | |
271 | |
272 _hg_cmd_commit() { | |
273 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
274 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
275 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
276 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_file -g \*.txt' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
277 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
278 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ |
3511 | 279 '*:file:_files -W $(_hg_cmd root)' |
280 } | |
281 | |
282 _hg_cmd_copy() { | |
283 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
284 '(--after -A)'{-A,--after}'[record a copy that has already occurred]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
285 '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \ |
3511 | 286 '*:file:_files -W $(_hg_cmd root)' |
287 } | |
288 | |
289 _hg_cmd_diff() { | |
290 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \ | |
3536
ef80b13df85a
zsh: add revrange completion
Brendan Cully <brendan@kublai.com>
parents:
3535
diff
changeset
|
291 '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \ |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
292 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
293 '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
294 '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
295 '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' \ |
3511 | 296 '*:file:_files -W $(_hg_cmd root)' |
3482
46958e428fcd
zsh completion: basic mq support
Brendan Cully <brendan@kublai.com>
parents:
1544
diff
changeset
|
297 } |
1362 | 298 |
3511 | 299 _hg_cmd_export() { |
300 _arguments -s -w : $_hg_global_opts $_hg_diff_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
301 '(--outout -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ |
3511 | 302 '--switch-parent[diff against the second parent]' \ |
303 '*:revision:_hg_tags' | |
304 } | |
3482
46958e428fcd
zsh completion: basic mq support
Brendan Cully <brendan@kublai.com>
parents:
1544
diff
changeset
|
305 |
3511 | 306 _hg_cmd_grep() { |
307 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
308 '(--print0 -0)'{-0,--print0}'[end filenames with NUL]' \ |
3511 | 309 '--all[print all revisions with matches]' \ |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
310 '(--follow -f)'{-f,--follow}'[follow changeset or file history]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
311 '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
312 '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revs that match]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
313 '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \ |
3536
ef80b13df85a
zsh: add revrange completion
Brendan Cully <brendan@kublai.com>
parents:
3535
diff
changeset
|
314 '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \ |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
315 '(--user -u)'{-u,--user}'[print user who committed change]' \ |
3511 | 316 '*:search pattern:_files -W $(_hg_cmd root)' |
317 } | |
1362 | 318 |
3511 | 319 _hg_cmd_heads() { |
320 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
321 '(--rev -r)'{-r+,--rev}'[show only heads which are descendants of rev]:revision:_hg_tags' |
3511 | 322 } |
323 | |
324 _hg_cmd_help() { | |
325 _arguments -s -w : $_hg_global_opts \ | |
326 '*:mercurial command:_hg_commands' | |
327 } | |
1362 | 328 |
3511 | 329 _hg_cmd_import() { |
330 _arguments -s -w : $_hg_global_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
331 '(--strip -p)'{-p+,--strip}'[directory strip option for patch (default: 1)]:count:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
332 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
333 '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \ |
3511 | 334 '*:patch:_files' |
335 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
336 |
3511 | 337 _hg_cmd_incoming() { |
338 _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
339 '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
340 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
341 '(--patch -p)'{-p,--patch}'[show patch]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
342 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
343 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ |
3511 | 344 '--bundle[file to store the bundles into]:bundle file:_files' \ |
345 ':source:_hg_remote' | |
346 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
347 |
3511 | 348 _hg_cmd_init() { |
349 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ | |
350 ':dir:_files -/' | |
351 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
352 |
3511 | 353 _hg_cmd_locate() { |
354 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
355 '(--rev -r)'{-r+,--rev}'[search repository as it stood at revision]:revision:_hg_tags' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
356 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
357 '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \ |
3511 | 358 '*:search pattern:_files -W $(_hg_cmd root)' |
359 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
360 |
3511 | 361 _hg_cmd_log() { |
362 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_style_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
363 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \ |
3511 | 364 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \ |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
365 '(--copies -C)'{-C,--copies}'[show copied files]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
366 '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
367 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \ |
3536
ef80b13df85a
zsh: add revrange completion
Brendan Cully <brendan@kublai.com>
parents:
3535
diff
changeset
|
368 '*'{-r,--rev}'[show the specified revision or range]:revision:_hg_revrange' \ |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
369 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
370 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
371 '(--patch -p)'{-p,--patch}'[show patch]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
372 '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_tags' \ |
3511 | 373 '*:files:_files -W $(_hg_cmd root)' |
374 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
375 |
3511 | 376 _hg_cmd_manifest() { |
377 _arguments -s -w : $_hg_global_opts \ | |
378 ':revision:_hg_tags' | |
379 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
380 |
3511 | 381 _hg_cmd_outgoing() { |
382 _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
383 '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
384 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
385 '(--patch -p)'{-p,--patch}'[show patch]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
386 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
387 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ |
3511 | 388 ':destination:_hg_remote' |
389 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
390 |
3511 | 391 _hg_cmd_parents() { |
392 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
393 '(--rev -r)'{-r+,--rev}'[show parents of the specified rev]:revision:_hg_tags' \ |
3511 | 394 ':revision:_hg_tags' |
395 } | |
396 | |
397 _hg_cmd_paths() { | |
398 _arguments -s -w : $_hg_global_opts \ | |
399 ':path:_hg_paths' | |
400 } | |
401 | |
402 _hg_cmd_pull() { | |
403 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
404 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
405 '(--update -u)'{-u,--update}'[update to new tip if changesets were pulled]' \ |
3511 | 406 ':source:_hg_remote' |
407 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
408 |
3511 | 409 _hg_cmd_push() { |
410 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
411 '(--force -f)'{-f,--force}'[force push]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
412 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \ |
3511 | 413 ':destination:_hg_remote' |
414 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
415 |
3511 | 416 _hg_cmd_remove() { |
417 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
418 '(--after -A)'{-A,--after}'[record remove that has already occurred]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
419 '(--force -f)'{-f,--force}'[remove file even if modified]' \ |
3511 | 420 '*:file:_files -W $(_hg_cmd root)' |
421 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
422 |
3511 | 423 _hg_cmd_rename() { |
424 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
425 '(--after -A)'{-A,--after}'[record a rename that has already occurred]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
426 '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \ |
3511 | 427 '*:file:_files -W $(_hg_cmd root)' |
428 } | |
1362 | 429 |
3511 | 430 _hg_cmd_revert() { |
431 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
432 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
433 '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_tags' \ |
3511 | 434 '--no-backup[do not save backup copies of files]' \ |
435 '*:file:_files -W $(_hg_cmd root)' | |
436 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
437 |
3511 | 438 _hg_cmd_serve() { |
439 _arguments -s -w : $_hg_global_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
440 '(--accesslog -A)'{-A+,--accesslog}'[name of access log file]:log file:_files' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
441 '(--errorlog -E)'{-E+,--errorlog}'[name of error log file]:log file:_files' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
442 '(--daemon -d)'{-d,--daemon}'[run server in background]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
443 '(--port -p)'{-p+,--port}'[listen port]:listen port:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
444 '(--address -a)'{-a+,--address}'[interface address]:interface address:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
445 '(--name -n)'{-n+,--name}'[name to show in web pages]:repository name:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
446 '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \ |
3511 | 447 '--style[web template style]:style' \ |
448 '--stdio[for remote clients]' \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
449 '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]' |
3511 | 450 } |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
451 |
3511 | 452 _hg_cmd_status() { |
453 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
454 '(--all -A)'{-A,--all}'[show status of all files]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
455 '(--modified -m)'{-m,--modified}'[show only modified files]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
456 '(--added -a)'{-a,--added}'[show only added files]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
457 '(--removed -r)'{-r,--removed}'[show only removed files]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
458 '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
459 '(--clean -c)'{-c,--clean}'[show only files without changes]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
460 '(--unknown -u)'{-u,--unknown}'[show only unknown files]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
461 '(--ignored -i)'{-i,--ignored}'[show ignored files]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
462 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
463 '(--copies -C)'{-C,--copies}'[show source of copied files]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
464 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ |
3511 | 465 '--rev[show difference from revision]:revision:_hg_tags' \ |
466 '*:files:_files' | |
467 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
468 |
3511 | 469 _hg_cmd_tag() { |
470 _arguments -s -w : $_hg_global_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
471 '(--local -l)'{-l,--local}'[make the tag local]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
472 '(--message -m)'{-m+,--message}'[message for tag commit log entry]:message:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
473 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
474 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
475 '(--rev -r)'{-r+,--rev}'[revision to tag]:revision:_hg_tags' \ |
3511 | 476 ':tag name:' |
477 } | |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
478 |
3511 | 479 _hg_cmd_tip() { |
480 _arguments -s -w : $_hg_global_opts $_hg_style_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
481 '(--patch -p)'{-p,--patch}'[show patch]' |
3511 | 482 } |
1438
c22da894e4cc
zsh completions: new -M, -m arguments for log, etc.
Steve Borho <steve@borho.org>
parents:
1368
diff
changeset
|
483 |
3511 | 484 _hg_cmd_unbundle() { |
485 _arguments -s -w : $_hg_global_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
486 '(--update -u)'{-u,--update}'[update to new tip if changesets were unbundled]' \ |
3511 | 487 ':files:_files' |
488 } | |
1362 | 489 |
3511 | 490 _hg_cmd_update() { |
491 _arguments -s -w : $_hg_global_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
492 '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
493 '(--force -f)'{-f,--force}'[force a merge with outstanding changes]' \ |
3511 | 494 ':revision:_hg_tags' |
495 } | |
1362 | 496 |
3511 | 497 # HGK |
498 _hg_cmd_view() { | |
499 _arguments -s -w : $_hg_global_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
500 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \ |
3511 | 501 ':revision range:_hg_tags' |
502 } | |
1362 | 503 |
3511 | 504 # MQ |
3527
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
505 _hg_qseries() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
506 typeset -a patches |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
507 patches=($(_hg_cmd qseries)) |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
508 (( $#patches )) && _describe -t hg-patches 'patches' patches |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
509 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
510 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
511 _hg_qapplied() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
512 typeset -a patches |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
513 patches=($(_hg_cmd qapplied)) |
3535
3dbec3f6d3a2
zsh: add qbase and qtip to qapplied completions
Brendan Cully <brendan@kublai.com>
parents:
3534
diff
changeset
|
514 if (( $#patches )) |
3dbec3f6d3a2
zsh: add qbase and qtip to qapplied completions
Brendan Cully <brendan@kublai.com>
parents:
3534
diff
changeset
|
515 then |
3dbec3f6d3a2
zsh: add qbase and qtip to qapplied completions
Brendan Cully <brendan@kublai.com>
parents:
3534
diff
changeset
|
516 patches+=(qbase qtip) |
3dbec3f6d3a2
zsh: add qbase and qtip to qapplied completions
Brendan Cully <brendan@kublai.com>
parents:
3534
diff
changeset
|
517 _describe -t hg-applied-patches 'applied patches' patches |
3dbec3f6d3a2
zsh: add qbase and qtip to qapplied completions
Brendan Cully <brendan@kublai.com>
parents:
3534
diff
changeset
|
518 fi |
3527
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
519 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
520 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
521 _hg_qunapplied() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
522 typeset -a patches |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
523 patches=($(_hg_cmd qunapplied)) |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
524 (( $#patches )) && _describe -t hg-unapplied-patches 'unapplied patches' patches |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
525 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
526 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
527 _hg_qguards() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
528 typeset -a guards |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
529 local guard |
3529
fe9c1e886b5e
zsh: complete qguard with +/- guard prefixes
Brendan Cully <brendan@kublai.com>
parents:
3527
diff
changeset
|
530 compset -P "+|-" |
3527
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
531 _hg_cmd qselect -s | while read guard |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
532 do |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
533 guards+=(${guard#(+|-)}) |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
534 done |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
535 (( $#guards )) && _describe -t hg-guards 'guards' guards |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
536 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
537 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
538 _hg_qseries_opts=( |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
539 '(--summary -s)'{-s,--summary}'[print first line of patch header]') |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
540 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
541 _hg_cmd_qapplied() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
542 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
543 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
544 |
3511 | 545 _hg_cmd_qdelete() { |
546 _arguments -s -w : $_hg_global_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
547 '(--keep -k)'{-k,--keep}'[keep patch file]' \ |
3536
ef80b13df85a
zsh: add revrange completion
Brendan Cully <brendan@kublai.com>
parents:
3535
diff
changeset
|
548 '*'{-r+,--rev}'[stop managing a revision]:applied patch:_hg_revrange' \ |
3527
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
549 '*:unapplied patch:_hg_qunapplied' |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
550 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
551 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
552 _hg_cmd_qdiff() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
553 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
554 '*:pattern:_files -W $(_hg_cmd root)' |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
555 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
556 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
557 _hg_cmd_qfold() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
558 _arguments -s -w : $_hg_global_opts $_h_commit_opts \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
559 '(--keep,-k)'{-k,--keep}'[keep folded patch files]' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
560 '*:unapplied patch:_hg_qunapplied' |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
561 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
562 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
563 _hg_cmd_qguard() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
564 _arguments -s -w : $_hg_global_opts \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
565 '(--list -l)'{-l,--list}'[list all patches and guards]' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
566 '(--none -n)'{-n,--none}'[drop all guards]' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
567 ':patch:_hg_qseries' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
568 '*:guards:_hg_qguards' |
3511 | 569 } |
1362 | 570 |
3511 | 571 _hg_cmd_qheader() { |
572 _arguments -s -w : $_hg_global_opts \ | |
573 ':patch:_hg_qseries' | |
574 } | |
1362 | 575 |
3527
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
576 _hg_cmd_qimport() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
577 _arguments -s -w : $_hg_global_opts \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
578 '(--existing -e)'{-e,--existing}'[import file in patch dir]' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
579 '(--name -n 2)'{-n+,--name}'[patch file name]:name:' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
580 '(--force -f)'{-f,--force}'[overwrite existing files]' \ |
3536
ef80b13df85a
zsh: add revrange completion
Brendan Cully <brendan@kublai.com>
parents:
3535
diff
changeset
|
581 '*'{-r+,--rev}'[place existing revisions under mq control]:revision:_hg_revrange' \ |
3527
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
582 '*:patch:_files' |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
583 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
584 |
3511 | 585 _hg_cmd_qnew() { |
586 _arguments -s -w : $_hg_global_opts $_hg_commit_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
587 '(--force -f)'{-f,--force}'[import uncommitted changes into patch]' \ |
3511 | 588 ':patch:' |
589 } | |
1368
d1d605d1e839
Fix completion function for 'hg pull'. Fix truncation bug and remove tabs.
Steve Borho <steve@borho.org>
parents:
1365
diff
changeset
|
590 |
3527
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
591 _hg_cmd_qnext() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
592 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
593 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
594 |
3511 | 595 _hg_cmd_qpop() { |
596 _arguments -s -w : $_hg_global_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
597 '(--all -a :)'{-a,--all}'[pop all patches]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
598 '(--name -n)'{-n+,--name}'[queue name to pop]:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
599 '(--force -f)'{-f,--force}'[forget any local changes]' \ |
3511 | 600 ':patch:_hg_qapplied' |
601 } | |
3482
46958e428fcd
zsh completion: basic mq support
Brendan Cully <brendan@kublai.com>
parents:
1544
diff
changeset
|
602 |
3527
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
603 _hg_cmd_qprev() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
604 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
605 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
606 |
3511 | 607 _hg_cmd_qpush() { |
608 _arguments -s -w : $_hg_global_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
609 '(--all -a :)'{-a,--all}'[apply all patches]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
610 '(--list -l)'{-l,--list}'[list patch name in commit text]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
611 '(--merge -m)'{-m+,--merge}'[merge from another queue]:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
612 '(--name -n)'{-n+,--name}'[merge queue name]:' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
613 '(--force -f)'{-f,--force}'[apply if the patch has rejects]' \ |
3511 | 614 ':patch:_hg_qunapplied' |
615 } | |
3482
46958e428fcd
zsh completion: basic mq support
Brendan Cully <brendan@kublai.com>
parents:
1544
diff
changeset
|
616 |
3511 | 617 _hg_cmd_qrefresh() { |
618 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
619 '(--git -g)'{-g,--git}'[use git extended diff format]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
620 '(--short -s)'{-s,--short}'[short refresh]' \ |
3511 | 621 '*:files:_files -W $(_hg_cmd root)' |
622 } | |
3482
46958e428fcd
zsh completion: basic mq support
Brendan Cully <brendan@kublai.com>
parents:
1544
diff
changeset
|
623 |
3527
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
624 _hg_cmd_qrename() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
625 _arguments -s -w : $_hg_global_opts \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
626 ':patch:_hg_qseries' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
627 ':destination:' |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
628 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
629 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
630 _hg_cmd_qselect() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
631 _arguments -s -w : $_hg_global_opts \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
632 '(--none -n :)'{-n,--none}'[disable all guards]' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
633 '(--series -s :)'{-s,--series}'[list all guards in series file]' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
634 '--pop[pop to before first guarded applied patch]' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
635 '--reapply[pop and reapply patches]' \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
636 '*:guards:_hg_qguards' |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
637 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
638 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
639 _hg_cmd_qseries() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
640 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts \ |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
641 '(--missing -m)'{-m,--missing}'[print patches not in series]' |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
642 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
643 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
644 _hg_cmd_qunapplied() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
645 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
646 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
647 |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
648 _hg_cmd_qtop() { |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
649 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
650 } |
ee6b8de6df3c
zsh: complete qapplied, qdiff, qfold, qguard, qimport, qnext, qprev
Brendan Cully <brendan@kublai.com>
parents:
3517
diff
changeset
|
651 |
3511 | 652 _hg_cmd_strip() { |
653 _arguments -s -w : $_hg_global_opts \ | |
3517
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
654 '(--force -f)'{-f,--force}'[force multi-head removal]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
655 '(--backup -b)'{-b,--backup}'[bundle unrelated changesets]' \ |
a6dd7ab568cc
zsh: make option lists more compact
Brendan Cully <brendan@kublai.com>
parents:
3511
diff
changeset
|
656 '(--nobackup -n)'{-n,--nobackup}'[no backups]' \ |
3511 | 657 ':revision:_hg_tags' |
658 } | |
3487
1b9494d2b070
zsh: expand tags lazily
Brendan Cully <brendan@kublai.com>
parents:
3482
diff
changeset
|
659 |
3511 | 660 _hg "$@" |