n_shexp_parse_token(): show erroneous substring
[s-mailx.git] / cmd-tab.h
blobb21a66b5a4d8febd1f58f0a40a1cc61645032fd1
1 /*@ S-nail - a mail user agent derived from Berkeley Mail.
2 *@ This is included by ./cmd-tab.c and defines the command array.
3 *@ TODO This should be generated by a script from a template. It should
4 *@ TODO sort the entries alphabetically, and create an array that is indexed
5 *@ TODO by first cmd letter with modulo, the found number is used to index a
6 *@ TODO multi-dimensional array with alphasorted entries. It should ensure
7 *@ TODO that (exact!) POSIX abbreviations order first.
8 *@ TODO And the data (and n_cmd_arg_desc) should be placed in special crafted
9 *@ TODO comments in or before the function source, to be collected by script.
11 * Copyright (c) 2000-2004 Gunnar Ritter, Freiburg i. Br., Germany.
12 * Copyright (c) 2012 - 2017 Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>.
15 * Copyright (c) 1980, 1993
16 * The Regents of the University of California. All rights reserved.
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
26 * 3. Neither the name of the University nor the names of its contributors
27 * may be used to endorse or promote products derived from this software
28 * without specific prior written permission.
30 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
31 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
34 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 * SUCH DAMAGE.
43 /* Because of the largish TODO, we yet become included twice.
44 * Not indented for that */
45 #ifndef n_CMD_TAB_H
46 # define n_CMD_TAB_H
48 n_CMD_ARG_DESC_SUBCLASS_DEF(bind, 3, a_ctab_cad_bind){
49 {n_CMD_ARG_DESC_WYSH, n_SHEXP_PARSE_TRIM_IFSSPACE},
50 {n_CMD_ARG_DESC_WYSH | n_CMD_ARG_DESC_OPTION | n_CMD_ARG_DESC_HONOUR_STOP,
51 n_SHEXP_PARSE_DRYRUN},
52 {n_CMD_ARG_DESC_WYSH | n_CMD_ARG_DESC_OPTION |
53 n_CMD_ARG_DESC_GREEDY | n_CMD_ARG_DESC_GREEDY_JOIN |
54 n_CMD_ARG_DESC_HONOUR_STOP,
55 n_SHEXP_PARSE_IGNORE_EMPTY | n_SHEXP_PARSE_TRIM_IFSSPACE}
56 }n_CMD_ARG_DESC_SUBCLASS_DEF_END;
58 n_CMD_ARG_DESC_SUBCLASS_DEF(call, 2, a_ctab_cad_call){
59 {n_CMD_ARG_DESC_WYSH | n_CMD_ARG_DESC_HONOUR_STOP,
60 n_SHEXP_PARSE_TRIM_IFSSPACE},
61 {n_CMD_ARG_DESC_WYSH | n_CMD_ARG_DESC_OPTION |
62 n_CMD_ARG_DESC_GREEDY | n_CMD_ARG_DESC_HONOUR_STOP,
63 n_SHEXP_PARSE_IFS_VAR | n_SHEXP_PARSE_TRIM_IFSSPACE}
64 }n_CMD_ARG_DESC_SUBCLASS_DEF_END;
66 n_CMD_ARG_DESC_SUBCLASS_DEF(readctl, 2, a_ctab_cad_readctl){
67 {n_CMD_ARG_DESC_WYSH | n_CMD_ARG_DESC_OPTION | n_CMD_ARG_DESC_HONOUR_STOP,
68 n_SHEXP_PARSE_TRIM_IFSSPACE},
69 {n_CMD_ARG_DESC_WYSH | n_CMD_ARG_DESC_OPTION |
70 n_CMD_ARG_DESC_GREEDY | n_CMD_ARG_DESC_GREEDY_JOIN |
71 n_CMD_ARG_DESC_HONOUR_STOP,
72 n_SHEXP_PARSE_IGNORE_EMPTY | n_SHEXP_PARSE_TRIM_IFSSPACE}
73 }n_CMD_ARG_DESC_SUBCLASS_DEF_END;
75 n_CMD_ARG_DESC_SUBCLASS_DEF(unbind, 2, a_ctab_cad_unbind){
76 {n_CMD_ARG_DESC_WYSH, n_SHEXP_PARSE_TRIM_IFSSPACE},
77 {n_CMD_ARG_DESC_WYSH | n_CMD_ARG_DESC_HONOUR_STOP, n_SHEXP_PARSE_DRYRUN}
78 }n_CMD_ARG_DESC_SUBCLASS_DEF_END;
80 n_CMD_ARG_DESC_SUBCLASS_DEF(vpospar, 2, a_ctab_cad_vpospar){
81 {n_CMD_ARG_DESC_WYSH | n_CMD_ARG_DESC_HONOUR_STOP,
82 n_SHEXP_PARSE_TRIM_IFSSPACE},
83 {n_CMD_ARG_DESC_WYSH | n_CMD_ARG_DESC_OPTION |
84 n_CMD_ARG_DESC_GREEDY | n_CMD_ARG_DESC_HONOUR_STOP,
85 n_SHEXP_PARSE_IFS_VAR | n_SHEXP_PARSE_TRIM_IFSSPACE}
86 }n_CMD_ARG_DESC_SUBCLASS_DEF_END;
88 #else /* ifndef n_CMD_TAB_H */
90 #ifdef HAVE_DOCSTRINGS
91 # define DS(S) , S
92 #else
93 # define DS(S)
94 #endif
96 #undef MAC
97 #define MAC (n_MAXARGC - 1)
99 /* Some shorter aliases to be able to define a command in two lines */
100 #define TMSGLST n_CMD_ARG_TYPE_MSGLIST
101 #define TNDMLST n_CMD_ARG_TYPE_NDMLIST
102 #define TRAWDAT n_CMD_ARG_TYPE_RAWDAT
103 # define TSTRING n_CMD_ARG_TYPE_STRING
104 #define TWYSH n_CMD_ARG_TYPE_WYSH
105 # define TRAWLST n_CMD_ARG_TYPE_RAWLIST
106 # define TWYRA n_CMD_ARG_TYPE_WYRA
107 #define TARG n_CMD_ARG_TYPE_ARG
109 #define A n_CMD_ARG_A
110 #define F n_CMD_ARG_F
111 #define G n_CMD_ARG_G
112 #define H n_CMD_ARG_H
113 #define I n_CMD_ARG_I
114 #define L n_CMD_ARG_L
115 #define M n_CMD_ARG_M
116 #define O n_CMD_ARG_O
117 #define P n_CMD_ARG_P
118 #define R n_CMD_ARG_R
119 #define SC n_CMD_ARG_SC
120 #define S n_CMD_ARG_S
121 #define T n_CMD_ARG_T
122 #define V n_CMD_ARG_V
123 #define W n_CMD_ARG_W
124 #define X n_CMD_ARG_X
125 #define EM n_CMD_ARG_EM
127 /* Note: the first command in here may NOT expand to an unsupported one!
128 * It is used for n_cmd_default() */
129 { "next", &c_next, (A | TNDMLST), 0, MMNDEL, NULL
130 DS(N_("Goes to the next message (-list) and prints it")) },
133 { "alias", &c_alias, (M | TWYRA), 0, MAC, NULL
134 DS(N_("Show all (or <alias>), or (re)define <alias> to :<data>:")) },
135 { "print", &c_type, (A | TMSGLST), 0, MMNDEL, NULL
136 DS(N_("Type all messages of <msglist>, honouring `ignore' / `retain'")) },
137 { "type", &c_type, (A | TMSGLST), 0, MMNDEL, NULL
138 DS(N_("Type all messages of <msglist>, honouring `ignore' / `retain'")) },
139 { "Type", &c_Type, (A | TMSGLST), 0, MMNDEL, NULL
140 DS(N_("Like `type', but bypass `ignore' / `retain'")) },
141 { "Print", &c_Type, (A | TMSGLST), 0, MMNDEL, NULL
142 DS(N_("Like `print', but bypass `ignore' / `retain'")) },
143 { "visual", &c_visual, (A | I | S | TMSGLST), 0, MMNORM, NULL
144 DS(N_("Edit <msglist>")) },
145 { "top", &c_top, (A | TMSGLST), 0, MMNDEL, NULL
146 DS(N_("Type first *toplines* of all messages in <msglist>")) },
147 { "Top", &c_Top, (A | TMSGLST), 0, MMNDEL, NULL
148 DS(N_("Like `top', but bypass `ignore' / `retain'")) },
149 { "touch", &c_stouch, (A | W | TMSGLST), 0, MMNDEL, NULL
150 DS(N_("Mark <msglist> for saving in *mbox*")) },
151 { "preserve", &c_preserve, (A | SC | W | TMSGLST), 0, MMNDEL, NULL
152 DS(N_("Save <msglist> in system mailbox instead of *MBOX*")) },
153 { "delete", &c_delete, (A | W | P | TMSGLST), 0, MMNDEL, NULL
154 DS(N_("Delete <msglist>")) },
155 { "dp", &c_deltype, (A | W | TMSGLST), 0, MMNDEL, NULL
156 DS(N_("Delete the current message, then type the next")) },
157 { "dt", &c_deltype, (A | W | TMSGLST), 0, MMNDEL, NULL
158 DS(N_("Delete the current message, then type the next")) },
159 { "undelete", &c_undelete, (A | P | TMSGLST), MDELETED, MMNDEL, NULL
160 DS(N_("Un`delete' <msglist>")) },
161 { "mail", &c_sendmail, (I | M | R | SC | EM | TSTRING), 0, 0, NULL
162 DS(N_("Compose mail; recipients may be given as arguments")) },
163 { "Mail", &c_Sendmail, (I | M | R | SC | EM | TSTRING), 0, 0, NULL
164 DS(N_("Like `mail', but derive filename from first recipient")) },
165 { "mbox", &c_mboxit, (A | W | TMSGLST), 0, MMNDEL, NULL
166 DS(N_("Indicate that <msglist> is to be stored in *MBOX*")) },
167 { "more", &c_more, (A | TMSGLST), 0, MMNDEL, NULL
168 DS(N_("Invoke the pager on the given messages")) },
169 { "page", &c_more, (A | TMSGLST), 0, MMNDEL, NULL
170 DS(N_("Invoke the pager on the given messages")) },
171 { "More", &c_More, (A | TMSGLST), 0, MMNDEL, NULL
172 DS(N_("Invoke the pager on the given messages")) },
173 { "Page", &c_More, (A | TMSGLST), 0, MMNDEL, NULL
174 DS(N_("Invoke the pager on the given messages")) },
175 { "unread", &c_unread, (A | TMSGLST), 0, MMNDEL, NULL
176 DS(N_("Mark <msglist> as not being read")) },
177 { "Unread", &c_unread, (A | TMSGLST), 0, MMNDEL, NULL
178 DS(N_("Mark <msglist> as not being read")) },
179 { "new", &c_unread, (A | TMSGLST), 0, MMNDEL, NULL
180 DS(N_("Mark <msglist> as not being read")) },
181 { "New", &c_unread, (A | TMSGLST), 0, MMNDEL, NULL
182 DS(N_("Mark <msglist> as not being read")) },
183 { n_em, &c_shell, (M | SC | V | X | EM | TRAWDAT), 0, 0, NULL
184 DS(N_("Execute <shell-command>")) },
185 { "copy", &c_copy, (A | M | TSTRING), 0, 0, NULL
186 DS(N_("Copy <msglist>, but don't mark them for deletion")) },
187 { "Copy", &c_Copy, (A | M | SC | TSTRING), 0, 0, NULL
188 DS(N_("Like `copy', but derive filename from first sender")) },
189 { "chdir", &c_chdir, (M | TWYRA), 0, 1, NULL
190 DS(N_("Change CWD to the specified/the login directory")) },
191 { "cd", &c_chdir, (M | X | TWYRA), 0, 1, NULL
192 DS(N_("Change working directory to the specified/the login directory")) },
193 { "save", &c_save, (A | TSTRING), 0, 0, NULL
194 DS(N_("Append <msglist> to <file>")) },
195 { "Save", &c_Save, (A | SC | TSTRING), 0, 0, NULL
196 DS(N_("Like `save', but derive filename from first sender")) },
197 { "set", &c_set, (G | L | M | X | TWYRA), 0, MAC, NULL
198 DS(N_("Print all variables, or set (a) <variable>(s)")) },
199 { "unalias", &c_unalias, (M | TWYRA), 1, MAC, NULL
200 DS(N_("Un`alias' <name-list> (* for all)")) },
201 { "write", &c_write, (A | TSTRING), 0, 0, NULL
202 DS(N_("Write (append) to <file>")) },
203 { "from", &c_from, (A | TMSGLST), 0, MMNORM, NULL
204 DS(N_("Type (matching) headers of <msglist> (a search specification)")) },
205 { "search", &c_from, (A | TMSGLST), 0, MMNORM, NULL
206 DS(N_("Search for <msglist>, type matching headers")) },
207 { "file", &c_file, (M | T | TWYRA), 0, 1, NULL
208 DS(N_("Open a new <mailbox> or show the current one")) },
209 { "followup", &c_followup, (A | I | R | SC | TMSGLST), 0, MMNDEL, NULL
210 DS(N_("Like `reply', but derive filename from first sender")) },
211 { "followupall", &c_followupall, (A | I | R | SC | TMSGLST), 0, MMNDEL, NULL
212 DS(N_("Like `reply', but derive filename from first sender")) },
213 { "followupsender", &c_followupsender, (A | I | R | SC | TMSGLST),
214 0, MMNDEL, NULL
215 DS(N_("Like `Followup', but always reply to the sender only")) },
216 { "folder", &c_file, (M | T | TWYRA), 0, 1, NULL
217 DS(N_("Open a new <mailbox> or show the current one")) },
218 { "folders", &c_folders, (M | T | TWYRA), 0, 1, NULL
219 DS(N_("List mailboxes below the given or the global folder")) },
220 { "headers", &c_headers, (A | M | TMSGLST), 0, MMNDEL, NULL
221 DS(N_("Type a page of headers (with the first of <msglist> if given)")) },
222 { "help", &a_ctab_c_help, (M | X | TWYRA), 0, 1, NULL
223 DS(N_("Show help [[Option] for the given command]]")) },
224 { n_qm, &a_ctab_c_help, (M | X | TWYRA), 0, 1, NULL
225 DS(N_("Show help [[Option] for the given command]]")) },
226 { "Reply", &c_Reply, (A | I | R | SC | EM | TMSGLST), 0, MMNDEL, NULL
227 DS(N_("Reply to originator, exclusively")) },
228 { "Respond", &c_Reply, (A | I | R | SC | EM | TMSGLST), 0, MMNDEL, NULL
229 DS(N_("Reply to originator, exclusively")) },
230 { "Followup", &c_Followup, (A | I | R | SC | EM | TMSGLST), 0, MMNDEL, NULL
231 DS(N_("Like `Reply', but derive filename from first sender")) },
232 { "reply", &c_reply, (A | I | R | SC | EM | TMSGLST), 0, MMNDEL, NULL
233 DS(N_("Reply to originator and recipients of <msglist>")) },
234 { "replyall", &c_replyall, (A | I | R | SC | EM | TMSGLST), 0, MMNDEL, NULL
235 DS(N_("Reply to originator and recipients of <msglist>")) },
236 { "replysender", &c_replysender, (A | I | R | SC | EM | TMSGLST),
237 0, MMNDEL, NULL
238 DS(N_("Reply to originator, exclusively")) },
239 { "respond", &c_reply, (A | I | R | SC | EM | TMSGLST), 0, MMNDEL, NULL
240 DS(N_("Reply to originators and recipients of <msglist>")) },
241 { "respondall", &c_replyall, (A | I | R | SC | EM | TMSGLST), 0, MMNDEL, NULL
242 DS(N_("Reply to originators and recipients of <msglist>")) },
243 { "respondsender", &c_replysender, (A | I | R | SC | EM | TMSGLST),
244 0, MMNDEL, NULL
245 DS(N_("Reply to originator, exclusively")) },
246 { "Resend", &c_Resend, (A | R | SC | EM | TSTRING), 0, MMNDEL, NULL
247 DS(N_("Like `resend', but don't add Resent-* header lines")) },
248 { "Redirect", &c_Resend, (O | A | R | SC | EM | TSTRING), 0, MMNDEL, NULL
249 DS(N_("Obsolete alternative for `Resend'")) },
250 { "resend", &c_resend, (A | R | SC | EM | TSTRING), 0, MMNDEL, NULL
251 DS(N_("Resend <msglist> to <user>, add Resent-* header lines")) },
252 { "redirect", &c_resend, (O | A | R | SC | EM | TSTRING), 0, MMNDEL, NULL
253 DS(N_("Obsolete alternative for `resend'")) },
254 { "Forward", &c_Forward, (A | R | SC | EM | TSTRING), 0, MMNDEL, NULL
255 DS(N_("Like `forward', but derive filename from <address>")) },
256 { "Fwd", &c_Forward, (O | A | R | SC | EM | TSTRING), 0, MMNDEL, NULL
257 DS(N_("Alias of `Forward'")) },
258 { "forward", &c_forward, (A | R | SC | EM | TSTRING), 0, MMNDEL, NULL
259 DS(N_("Forward <message> to <address>")) },
260 { "fwd", &c_forward, (O | A | R | SC | EM | TSTRING), 0, MMNDEL, NULL
261 DS(N_("Alias of `forward'")) },
262 { "edit", &c_editor, (G | A | I | S | TMSGLST), 0, MMNORM, NULL
263 DS(N_("Edit <msglist>")) },
264 { "pipe", &c_pipe, (A | TSTRING), 0, MMNDEL, NULL
265 DS(N_("Pipe <msglist> to <command>, honouring `ignore' / `retain'")) },
266 { "|", &c_pipe, (A | TSTRING), 0, MMNDEL, NULL
267 DS(N_("Pipe <msglist> to <command>, honouring `ignore' / `retain'")) },
268 { "Pipe", &c_Pipe, (A | TSTRING), 0, MMNDEL, NULL
269 DS(N_("Like `pipe', but bypass `ignore' / `retain'")) },
270 { "size", &c_messize, (A | TMSGLST), 0, MMNDEL, NULL
271 DS(N_("Show size in bytes for <msglist>")) },
272 { "hold", &c_preserve, (A | SC | W | TMSGLST), 0, MMNDEL, NULL
273 DS(N_("Save <msglist> in system mailbox instead of *MBOX*")) },
274 { "if", &c_if, (G | F | M | X | TRAWLST), 1, MAC, NULL
275 DS(N_("Part of the if/elif/else/endif statement")) },
276 { "else", &c_else, (G | F | M | X | TWYSH), 0, 0, NULL
277 DS(N_("Part of the if/elif/else/endif statement")) },
278 { "elif", &c_elif, (G | F | M | X | TRAWLST), 1, MAC, NULL
279 DS(N_("Part of the if/elif/else/endif statement")) },
280 { "endif", &c_endif, (G | F | M | X | TWYSH), 0, 0, NULL
281 DS(N_("Part of the if/elif/else/endif statement")) },
282 { "alternates", &c_alternates, (M | V | TWYSH), 0, MAC, NULL
283 DS(N_("Show or define alternate <address-list> for the invoking user")) },
284 { "unalternates", &c_unalternates, (M | TWYSH), 1, MAC, NULL
285 DS(N_("Delete alternate <address-list> (* for all)")) },
286 { "ignore", &c_ignore, (M | TWYRA), 0, MAC, NULL
287 DS(N_("Add <header-list> to the ignored LIST, or show that list")) },
288 { "discard", &c_ignore, (M | TWYRA), 0, MAC, NULL
289 DS(N_("Add <header-list> to the ignored LIST, or show that list")) },
290 { "retain", &c_retain, (M | TWYRA), 0, MAC, NULL
291 DS(N_("Add <header-list> to retained list, or show that list")) },
292 { "saveignore", &c_saveignore, (O | M | TRAWLST), 0, MAC, NULL
293 DS(N_("Obsoleted by `headerpick'")) },
294 { "savediscard", &c_saveignore, (O | M | TRAWLST), 0, MAC, NULL
295 DS(N_("Obsoleted by `headerpick'")) },
296 { "saveretain", &c_saveretain, (O | M | TRAWLST), 0, MAC, NULL
297 DS(N_("Obsoleted by `headerpick'")) },
298 { "unignore", &c_unignore, (M | TWYRA), 0, MAC, NULL
299 DS(N_("Un`ignore' <header-list>")) },
300 { "unretain", &c_unretain, (M | TWYRA), 0, MAC, NULL
301 DS(N_("Un`retain' <header-list>")) },
302 { "unsaveignore", &c_unsaveignore, (O | M | TRAWLST), 0, MAC, NULL
303 DS(N_("Obsoleted by `unheaderpick'")) },
304 { "unsaveretain", &c_unsaveretain, (O | M | TRAWLST), 0, MAC, NULL
305 DS(N_("Obsoleted by `unheaderpick'")) },
306 { "newmail", &c_newmail, (A | T | TWYSH), 0, 0, NULL
307 DS(N_("Check for new mail in current folder")) },
308 { "shortcut", &c_shortcut, (M | TWYRA), 0, MAC, NULL
309 DS(N_("Define <shortcut>s and their <expansion>, or list shortcuts")) },
310 { "unshortcut", &c_unshortcut, (M | TWYRA), 1, MAC, NULL
311 DS(N_("Delete <shortcut-list> (* for all)")) },
312 { "thread", &c_thread, (O | A | TMSGLST), 0, 0, NULL
313 DS(N_("Obsoleted by `sort' \"thread\"")) },
314 { "unthread", &c_unthread, (O | A | TMSGLST), 0, 0, NULL
315 DS(N_("Obsolete (use `unsort')")) },
316 { "sort", &c_sort, (A | TWYSH), 0, 1, NULL
317 DS(N_("Change sorting to: date,from,size,spam,status,subject,thread,to"))},
318 { "unsort", &c_unthread, (A | TMSGLST), 0, 0, NULL
319 DS(N_("Disable sorted or threaded mode")) },
320 { "flag", &c_flag, (A | M | TMSGLST), 0, 0, NULL
321 DS(N_("(Un)Flag <msglist> (for special attention)")) },
322 { "unflag", &c_unflag, (A | M | TMSGLST), 0, 0, NULL
323 DS(N_("(Un)Flag <msglist> (for special attention)")) },
324 { "answered", &c_answered, (A | M | TMSGLST), 0, 0, NULL
325 DS(N_("Mark the given <msglist> as answered")) },
326 { "unanswered", &c_unanswered, (A | M | TMSGLST), 0, 0, NULL
327 DS(N_("Un`answered' <msglist>")) },
328 { "draft", &c_draft, (A | M | TMSGLST), 0, 0, NULL
329 DS(N_("Mark <msglist> as draft")) },
330 { "undraft", &c_undraft, (A | M | TMSGLST), 0, 0, NULL
331 DS(N_("Un`draft' <msglist>")) },
332 { "move", &c_move, (A | M | TSTRING), 0, 0, NULL
333 DS(N_("Like `copy', but mark messages for deletion")) },
334 { "mv", &c_move, (A | M | TSTRING), 0, 0, NULL
335 DS(N_("Like `copy', but mark messages for deletion")) },
336 { "Move", &c_Move, (A | M | SC | TSTRING), 0, 0, NULL
337 DS(N_("Like `move', but derive filename from first sender")) },
338 { "Mv", &c_Move, (A | M | SC | TSTRING), 0, 0, NULL
339 DS(N_("Like `move', but derive filename from first sender")) },
340 { "noop", &c_noop, (A | M | TWYSH), 0, 0, NULL
341 DS(N_("NOOP command if current `file' is accessed via network")) },
342 { "collapse", &c_collapse, (A | TMSGLST), 0, 0, NULL
343 DS(N_("Collapse thread views for <msglist>")) },
344 { "uncollapse", &c_uncollapse, (A | TMSGLST), 0, 0, NULL
345 DS(N_("Uncollapse <msglist> if in threaded view")) },
346 { "verify",
347 #ifdef HAVE_XSSL
348 &c_verify,
349 #else
350 NULL,
351 #endif
352 (A | TMSGLST), 0, 0, NULL
353 DS(N_("Verify <msglist>")) },
354 { "decrypt", &c_decrypt, (A | M | TSTRING), 0, 0, NULL
355 DS(N_("Like `copy', but decrypt first, if encrypted")) },
356 { "Decrypt", &c_Decrypt, (A | M | SC | TSTRING), 0, 0, NULL
357 DS(N_("Like `decrypt', but derive filename from first sender")) },
358 { "certsave",
359 #ifdef HAVE_SSL
360 &c_certsave,
361 #else
362 NULL,
363 #endif
364 (A | TSTRING), 0, 0, NULL
365 DS(N_("Save S/MIME certificates of <msglist> to <file>")) },
366 { "rename", &c_rename, (M | TWYRA), 0, 2, NULL
367 DS(N_("Rename <existing-folder> to <new-folder>")) },
368 { "remove", &c_remove, (M | TWYRA), 0, MAC, NULL
369 DS(N_("Remove the named folders")) },
370 { "show", &c_show, (A | TMSGLST), 0, MMNDEL, NULL
371 DS(N_("Like `type', but show raw message content of <msglist>")) },
372 { "Show", &c_show, (A | TMSGLST), 0, MMNDEL, NULL
373 DS(N_("Like `Type', but show raw message content of <msglist>")) },
374 { "mimeview", &c_mimeview, (A | I | EM | TMSGLST), 0, MMNDEL, NULL
375 DS(N_("Show non-text parts of the given <message>")) },
376 { "seen", &c_seen, (A | M | TMSGLST), 0, MMNDEL, NULL
377 DS(N_("Mark <msglist> as seen")) },
378 { "Seen", &c_seen, (A | M | TMSGLST), 0, MMNDEL, NULL
379 DS(N_("Mark <msglist> as seen")) },
380 { "fwdignore", &c_fwdignore, (O | M | TRAWLST), 0, MAC, NULL
381 DS(N_("Obsoleted by `headerpick'")) },
382 { "fwddiscard", &c_fwdignore, (O | M | TRAWLST), 0, MAC, NULL
383 DS(N_("Obsoleted by `headerpick'")) },
384 { "fwdretain", &c_fwdretain, (O | M | TRAWLST), 0, MAC, NULL
385 DS(N_("Obsoleted by `headerpick'")) },
386 { "unfwdignore", &c_unfwdignore, (O | M | TRAWLST), 0, MAC, NULL
387 DS(N_("Obsoleted by `unheaderpick'")) },
388 { "unfwdretain", &c_unfwdretain, (O | M | TRAWLST), 0, MAC, NULL
389 DS(N_("Obsoleted by `unheaderpick'")) },
390 { "mimetype", &c_mimetype, (M | TWYRA), 0, MAC, NULL
391 DS(N_("(Load and) show all known MIME types, or define some")) },
392 { "unmimetype", &c_unmimetype, (M | TWYRA), 1, MAC, NULL
393 DS(N_("Delete <type>s (reset, * for all; former reinitializes)")) },
395 { "spamclear",
396 #ifdef HAVE_SPAM
397 &c_spam_clear,
398 #else
399 NULL,
400 #endif
401 (A | M | TMSGLST), 0, MMNDEL, NULL
402 DS(N_("Clear the spam flag for each message in <msglist>")) },
403 { "spamset",
404 #ifdef HAVE_SPAM
405 &c_spam_set,
406 #else
407 NULL,
408 #endif
409 (A | M | TMSGLST), 0, MMNDEL, NULL
410 DS(N_("Set the spam flag for each message in <msglist>")) },
411 { "spamforget",
412 #ifdef HAVE_SPAM
413 &c_spam_forget,
414 #else
415 NULL,
416 #endif
417 (A | M | TMSGLST), 0, MMNDEL, NULL
418 DS(N_("Force the spam detector to unlearn <msglist>")) },
419 { "spamham",
420 #ifdef HAVE_SPAM
421 &c_spam_ham,
422 #else
423 NULL,
424 #endif
425 (A | M | TMSGLST), 0, MMNDEL, NULL
426 DS(N_("Teach the spam detector that <msglist> is ham")) },
427 { "spamrate",
428 #ifdef HAVE_SPAM
429 &c_spam_rate,
430 #else
431 NULL,
432 #endif
433 (A | M | TMSGLST), 0, MMNDEL, NULL
434 DS(N_("Rate <msglist> via the spam detector")) },
435 { "spamspam",
436 #ifdef HAVE_SPAM
437 &c_spam_spam,
438 #else
439 NULL,
440 #endif
441 (A | M | TMSGLST), 0, MMNDEL, NULL
442 DS(N_("Teach the spam detector that <msglist> is spam")) },
444 { "File", &c_File, (M | T | TWYRA), 0, 1, NULL
445 DS(N_("Open a new mailbox readonly, or show the current mailbox")) },
446 { "Folder", &c_File, (M | T | TWYRA), 0, 1, NULL
447 DS(N_("Open a new mailbox readonly, or show the current mailbox")) },
448 { "mlist", &c_mlist, (M | TWYRA), 0, MAC, NULL
449 DS(N_("Show all known mailing lists or define some")) },
450 { "unmlist", &c_unmlist, (M | TWYRA), 1, MAC, NULL
451 DS(N_("Un`mlist' <name-list> (* for all)")) },
452 { "mlsubscribe", &c_mlsubscribe, (M | TWYRA), 0, MAC, NULL
453 DS(N_("Show all mailing list subscriptions or define some")) },
454 { "unmlsubscribe", &c_unmlsubscribe, (M | TWYRA), 1, MAC, NULL
455 DS(N_("Un`mlsubscribe' <name-list> (* for all)"))},
456 { "Lreply", &c_Lreply, (A | I | R | SC | EM | TMSGLST), 0, MMNDEL, NULL
457 DS(N_("Mailing-list reply to the given <msglist>")) },
458 { "dotmove", &c_dotmove, (A | TSTRING), 1, 1, NULL
459 DS(N_("Move the dot up <-> or down <+> by one")) },
461 /* New-style commands without un* counterpart */
463 { "=", &c_pdot, (A | TWYSH), 0, 0, NULL
464 DS(N_("Show current message number")) },
466 { "call", &c_call, (M | X | EM | TARG), 0, 0,
467 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_call)
468 DS(N_("Call macro <name> [:<arg>:]")) },
469 { "call_if", &c_call_if, (M | X | EM | TARG), 0, 0,
470 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_call)
471 DS(N_("Call macro <name> like `call', but be silent if non-existent")) },
472 { "cwd", &c_cwd, (M | V | X | TWYSH), 0, 0, NULL
473 DS(N_("Print current working directory (CWD)")) },
475 { "echo", &c_echo, (G | M | V | X | EM | TWYSH), 0, MAC, NULL
476 DS(N_("Echo arguments, and a trailing newline, to standard output")) },
477 { "echoerr", &c_echoerr, (G | M | V | X | EM | TWYSH), 0, MAC, NULL
478 DS(N_("Echo arguments, and a trailing newline, to standard error")) },
479 { "echon", &c_echon, (G | M | V | X | EM | TWYSH), 0, MAC, NULL
480 DS(N_("Echo arguments, without a trailing newline, to standard output")) },
481 { "echoerrn", &c_echoerrn, (G | M | V| X | EM | TWYSH), 0, MAC, NULL
482 DS(N_("Echo arguments, without a trailing newline, to standard error")) },
483 { "environ", &c_environ, (G | M | X | TWYSH), 2, MAC, NULL
484 DS(N_("<link|set|unset> (an) environment <variable>(s)")) },
485 { "errors",
486 #ifdef HAVE_ERRORS
487 &c_errors,
488 #else
489 NULL,
490 #endif
491 (H | I | M | TWYSH), 0, 1, NULL
492 DS(N_("Either [<show>] or <clear> the error message ring")) },
493 { "eval", &c_eval, (G | M | X | EM | TWYSH), 1, MAC, NULL
494 DS(N_("Construct command from :<arguments>:, reuse its $? and $!")) },
495 { "exit", &c_exit, (M | X | TWYSH), 0, 1, NULL
496 DS(N_("Immediately return [<status>] to the shell without saving")) },
498 { "history",
499 #ifdef HAVE_HISTORY
500 &c_history,
501 #else
502 NULL,
503 #endif
504 (H | I | M | TWYSH), 0, 1, NULL
505 DS(N_("<show> (default), <clear> or select <NO> from editor history")) },
507 { "list", &a_ctab_c_list, (M | TWYSH), 0, 1, NULL
508 DS(N_("List all commands (with argument: in prefix search order)")) },
509 { "localopts", &c_localopts, (H | M | X | TWYSH), 1, 2, NULL
510 DS(N_("Localize variable modifications? [<attribute>] <boolean>"))},
512 { "netrc",
513 #ifdef HAVE_NETRC
514 &c_netrc,
515 #else
516 NULL,
517 #endif
518 (M | TWYSH), 0, 1, NULL
519 DS(N_("[<show>], <load> or <clear> the .netrc cache")) },
521 { "quit", &c_quit, TWYSH, 0, 1, NULL
522 DS(N_("Exit session with [<status>], saving messages as necessary")) },
524 { "read", &c_read, (G | M | X | EM | TWYSH), 1, MAC, NULL
525 DS(N_("Read a line from standard input into <variable>(s)")) },
526 { "readall", &c_readall, (G | M | X | EM | TWYSH), 1, 1, NULL
527 DS(N_("Read anything from standard input until EOF into <variable>")) },
528 { "readctl", &c_readctl, (G | M | X | EM | TARG), 0, 0,
529 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_readctl)
530 DS(N_(
531 "[<show>], <create> <spec>, <set> <spec>, <remove> <spec> read channels")
533 { "return", &c_return, (M | X | EM | TWYSH), 0, 2, NULL
534 DS(N_("Return control [with <return value> [<exit status>]] from macro"))},
536 { "shell", &c_dosh, (I | S | EM | TWYSH), 0, 0, NULL
537 DS(N_("Invoke an interactive shell")) },
538 { "shift", &c_shift, (M | X | TWYSH), 0, 1, NULL
539 DS(N_("In a `call'ed macro, shift positional parameters")) },
540 { "sleep", &c_sleep, (H | M | X | EM | TWYSH), 1, 3, NULL
541 DS(N_("Sleep for <seconds> [<milliseconds>]"))},
542 { "source", &c_source, (M | TWYSH), 1, 1, NULL
543 DS(N_("Read commands from <file>")) },
544 { "source_if", &c_source_if, (M | TWYSH), 1, 1, NULL
545 DS(N_("If <file> can be opened successfully, read commands from it")) },
547 { "unset", &c_unset, (G | L | M | X | TWYSH), 1, MAC, NULL
548 DS(N_("Unset <option-list>")) },
550 { "varshow", &c_varshow, (G | M | X | TWYSH), 1, MAC, NULL
551 DS(N_("Show some informations about the given <variables>")) },
552 { "varedit", &c_varedit, (G | I | M | S | TWYSH), 1, MAC, NULL
553 DS(N_("Edit the value(s) of (an) variable(s), or create them")) },
554 { "vexpr", &c_vexpr, (G | M | V | X | EM | TWYSH), 2, MAC, NULL
555 DS(N_("Evaluate according to <operator> any :<arguments>:")) },
556 { "vpospar", &c_vpospar, (G | M | V | X | EM | TARG), 0, 0,
557 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_vpospar)
558 DS(N_("Positional parameters: <clear>, <quote>, or <set> from :<arg>:"))},
560 { "version", &c_version, (H | M | X | TWYSH), 0, 0, NULL
561 DS(N_("Show the version and feature set of the program")) },
563 { "xit"/*POSIX, first!*/, &c_exit, (M | X | TWYSH), 0, 1, NULL
564 DS(N_("Immediately return [<status>] to the shell without saving")) },
565 { "xcall", &c_xcall, (M | X | EM | TARG), 0, 0,
566 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_call)
567 DS(N_("Replace currently executing macro with macro <name> [:<arg>:]")) },
569 { "z", &c_scroll, (A | M | TWYSH), 0, 1, NULL
570 DS(N_("Scroll header display as indicated by the argument (0,-,+,$)")) },
571 { "Z", &c_Scroll, (A | M | TWYSH), 0, 1, NULL
572 DS(N_("Like `z', but continues to the next flagged message")) },
574 /* New-style commands with un* counterpart */
576 { "account", &c_account, (M | TWYSH), 0, MAC, NULL
577 DS(N_("Create or select <account>, or list all accounts")) },
578 { "unaccount", &c_unaccount, (M | TWYSH), 1, MAC, NULL
579 DS(N_("Delete all given <accounts> (* for all)")) },
581 { "bind",
582 #ifdef HAVE_KEY_BINDINGS
583 &c_bind,
584 #else
585 NULL,
586 #endif
587 (M | TARG), 1, MAC, n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_bind)
588 DS(N_("For <context> (base), [<show>] or bind <key[:,key:]> [:<data>:]"))},
589 { "unbind",
590 #ifdef HAVE_KEY_BINDINGS
591 &c_unbind,
592 #else
593 NULL,
594 #endif
595 (M | TARG), 2, 2, n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_unbind)
596 DS(N_("Un`bind' <context> <key[:,key:]> (* for all)")) },
598 { "charsetalias", &c_charsetalias, (M | TWYSH), 0, MAC, NULL
599 DS(N_("Define [:<charset> <charset-alias>:]s, or list mappings")) },
600 { "uncharsetalias", &c_uncharsetalias, (M | TWYSH), 1, MAC, NULL
601 DS(N_("Delete <charset-mapping-list> (* for all)")) },
603 { "colour",
604 #ifdef HAVE_COLOUR
605 &c_colour,
606 #else
607 NULL,
608 #endif
609 (M | TWYSH), 1, 4, NULL
610 DS(N_("Show colour settings of <type> (1,8,256,all/*) or define one")) },
611 { "uncolour",
612 #ifdef HAVE_COLOUR
613 &c_uncolour,
614 #else
615 NULL,
616 #endif
617 (M | TWYSH), 2, 3, NULL
618 DS(N_("Un`colour' <type> <mapping> (* for all) [<precondition>]")) },
620 { "commandalias", &c_commandalias, (M | X | TWYSH), 0, MAC, NULL
621 DS(N_("Print/create command <alias> [<command>], or list all aliases")) },
622 { "uncommandalias", &c_uncommandalias, (M | X | TWYSH), 1, MAC, NULL
623 DS(N_("Delete <command-alias-list> (* for all)")) },
624 { "ghost", &c_commandalias, (O | M | X | TWYRA), 0, MAC, NULL
625 DS(N_("Obsoleted by `commandalias'")) },
626 { "unghost", &c_uncommandalias, (O | M | X | TWYRA), 1, MAC, NULL
627 DS(N_("Obsoleted by `uncommandalias'")) },
629 { "define", &c_define, (M | X | TWYSH), 0, 2, NULL
630 DS(N_("Define a <macro> or show the currently defined ones")) },
631 { "undefine", &c_undefine, (M | X | TWYSH), 1, MAC, NULL
632 DS(N_("Un`define' all given <macros> (* for all)")) },
634 { "filetype", &c_filetype, (M | TWYSH), 0, MAC, NULL
635 DS(N_("Create [:<extension> <load-cmd> <save-cmd>:] "
636 "or list file handlers"))},
637 { "unfiletype", &c_unfiletype, (M | TWYSH), 1, MAC, NULL
638 DS(N_("Delete file handler for [:<extension>:] (* for all)")) },
640 { "headerpick", &c_headerpick, (M | TWYSH), 0, MAC, NULL
641 DS(N_("Header selection: [<context> [<type> [<header-list>]]]"))},
642 { "unheaderpick", &c_unheaderpick, (M | TWYSH), 3, MAC, NULL
643 DS(N_("Header deselection: <context> <type> <header-list>"))},
645 /* Codec commands */
647 { "addrcodec", &c_addrcodec, (G | M | V | X | EM | TRAWDAT), 0, 0, NULL
648 DS(N_("Email address <[+[+[+]]]e[ncode]|d[ecode]|s[kin]> <rest-of-line>"))},
650 { "shcodec", &c_shcodec, (G | M | V | X | EM | TRAWDAT), 0, 0, NULL
651 DS(N_("Shell quoting: <[+]e[ncode]|d[ecode]> <rest-of-line>")) },
653 { "urlcodec", &c_urlcodec, (G | M | V | X | EM | TRAWDAT), 0, 0, NULL
654 DS(N_("URL percent <[path]e[ncode]|[path]d[ecode]> <rest-of-line>")) },
655 { "urlencode", &c_urlencode, (O | G | M | X | TWYRA), 1, MAC, NULL
656 DS(N_("Obsoleted by `urlcodec'")) },
657 { "urldecode", &c_urldecode, (O | G | M | X | TWYRA), 1, MAC, NULL
658 DS(N_("Obsoleted by `urlcodec'")) }
660 #ifdef HAVE_MEMORY_DEBUG
661 ,{ "memtrace", &c_memtrace, (I | M | TWYSH), 0, 0, NULL
662 DS(N_("Trace current memory usage afap")) }
663 #endif
664 #ifdef HAVE_DEVEL
665 ,{ "sigstate", &c_sigstate, (I | M | TWYSH), 0, 0, NULL
666 DS(N_("Show signal handler states")) }
667 #endif
669 /* Obsolete stuff */
671 #ifdef HAVE_IMAP
672 ,{ "imap", &c_imap_imap, (A | TSTRING), 0, MAC, NULL
673 DS(N_("Send command strings directly to the IMAP server")) },
674 { "connect", &c_connect, (A | TSTRING), 0, 0, NULL
675 DS(N_("If disconnected, connect to IMAP mailbox")) },
676 { "disconnect", &c_disconnect, (A | TNDMLST), 0, 0, NULL
677 DS(N_("If connected, disconnect from IMAP mailbox")) },
678 { "cache", &c_cache, (A | TMSGLST), 0, 0, NULL
679 DS(N_("Read specified <message list> into the IMAP cache")) },
681 { "imapcodec", &c_imapcodec, (G | M | V | X | TRAWDAT), 0, 0, NULL
682 DS(N_("IMAP mailbox name <e[ncode]|d[ecode]> <rest-of-line>")) }
683 #endif
685 #undef DS
687 #undef MAC
689 #undef TMSGLST
690 #undef TNDMLST
691 #undef TRAWDAT
692 # undef TSTRING
693 #undef TWYSH
694 # undef TRAWLST
695 # undef TWYRA
696 #undef TARG
698 #undef A
699 #undef F
700 #undef G
701 #undef H
702 #undef I
703 #undef M
704 #undef O
705 #undef P
706 #undef R
707 #undef T
708 #undef V
709 #undef W
710 #undef X
711 #undef EM
713 #endif /* n_CMD_TAB_H */
715 /* s-it-mode */