a_head_addrspec_check(): do not treat high-bit bytes as _T_SPECIAL..
[s-mailx.git] / cmd-tab.h
blob741cba01a8a028edbb79d2844dfa907c247a2d39
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 M n_CMD_ARG_M
115 #define O n_CMD_ARG_O
116 #define P n_CMD_ARG_P
117 #define R n_CMD_ARG_R
118 #define S n_CMD_ARG_S
119 #define T n_CMD_ARG_T
120 #define V n_CMD_ARG_V
121 #define W n_CMD_ARG_W
122 #define X n_CMD_ARG_X
123 #define EM n_CMD_ARG_EM
125 /* Note: the first command in here may NOT expand to an unsupported one!
126 * It is used for n_cmd_default() */
127 { "next", &c_next, (A | TNDMLST), 0, MMNDEL, NULL
128 DS(N_("Goes to the next message (-list) and prints it")) },
131 { "alias", &c_alias, (M | TWYRA), 0, MAC, NULL
132 DS(N_("Show all (or <alias>), or (re)define <alias> to :<data>:")) },
133 { "print", &c_type, (A | TMSGLST), 0, MMNDEL, NULL
134 DS(N_("Type all messages of <msglist>, honouring `ignore' / `retain'")) },
135 { "type", &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_("Like `type', but bypass `ignore' / `retain'")) },
139 { "Print", &c_Type, (A | TMSGLST), 0, MMNDEL, NULL
140 DS(N_("Like `print', but bypass `ignore' / `retain'")) },
141 { "visual", &c_visual, (A | I | S | TMSGLST), 0, MMNORM, NULL
142 DS(N_("Edit <msglist>")) },
143 { "top", &c_top, (A | TMSGLST), 0, MMNDEL, NULL
144 DS(N_("Type first *toplines* of all messages in <msglist>")) },
145 { "Top", &c_Top, (A | TMSGLST), 0, MMNDEL, NULL
146 DS(N_("Like `top', but bypass `ignore' / `retain'")) },
147 { "touch", &c_stouch, (A | W | TMSGLST), 0, MMNDEL, NULL
148 DS(N_("Mark <msglist> for saving in *mbox*")) },
149 { "preserve", &c_preserve, (A | S | W | TMSGLST), 0, MMNDEL, NULL
150 DS(N_("Save <msglist> in system mailbox instead of *MBOX*")) },
151 { "delete", &c_delete, (A | W | P | TMSGLST), 0, MMNDEL, NULL
152 DS(N_("Delete <msglist>")) },
153 { "dp", &c_deltype, (A | W | TMSGLST), 0, MMNDEL, NULL
154 DS(N_("Delete the current message, then type the next")) },
155 { "dt", &c_deltype, (A | W | TMSGLST), 0, MMNDEL, NULL
156 DS(N_("Delete the current message, then type the next")) },
157 { "undelete", &c_undelete, (A | P | TMSGLST), MDELETED, MMNDEL, NULL
158 DS(N_("Un`delete' <msglist>")) },
159 { "mail", &c_sendmail, (I | M | R | S | EM | TSTRING), 0, 0, NULL
160 DS(N_("Compose mail; recipients may be given as arguments")) },
161 { "Mail", &c_Sendmail, (I | M | R | S | EM | TSTRING), 0, 0, NULL
162 DS(N_("Like `mail', but derive filename from first recipient")) },
163 { "mbox", &c_mboxit, (A | W | TMSGLST), 0, MMNDEL, NULL
164 DS(N_("Indicate that <msglist> is to be stored in *MBOX*")) },
165 { "more", &c_more, (A | TMSGLST), 0, MMNDEL, NULL
166 DS(N_("Invoke the pager on the given messages")) },
167 { "page", &c_more, (A | TMSGLST), 0, MMNDEL, NULL
168 DS(N_("Invoke the pager on the given messages")) },
169 { "More", &c_More, (A | TMSGLST), 0, MMNDEL, NULL
170 DS(N_("Invoke the pager on the given messages")) },
171 { "Page", &c_More, (A | TMSGLST), 0, MMNDEL, NULL
172 DS(N_("Invoke the pager on the given messages")) },
173 { "unread", &c_unread, (A | TMSGLST), 0, MMNDEL, NULL
174 DS(N_("Mark <msglist> as not being read")) },
175 { "Unread", &c_unread, (A | TMSGLST), 0, MMNDEL, NULL
176 DS(N_("Mark <msglist> as not being read")) },
177 { "new", &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 { n_em, &c_shell, (S | V | X | EM | TRAWDAT), 0, 0, NULL
182 DS(N_("Execute <shell-command>")) },
183 { "copy", &c_copy, (A | M | TSTRING), 0, 0, NULL
184 DS(N_("Copy <msglist>, but don't mark them for deletion")) },
185 { "Copy", &c_Copy, (A | M | S | TSTRING), 0, 0, NULL
186 DS(N_("Like `copy', but derive filename from first sender")) },
187 { "chdir", &c_chdir, (M | TWYRA), 0, 1, NULL
188 DS(N_("Change CWD to the specified/the login directory")) },
189 { "cd", &c_chdir, (M | X | TWYRA), 0, 1, NULL
190 DS(N_("Change working directory to the specified/the login directory")) },
191 { "save", &c_save, (A | TSTRING), 0, 0, NULL
192 DS(N_("Append <msglist> to <file>")) },
193 { "Save", &c_Save, (A | S | TSTRING), 0, 0, NULL
194 DS(N_("Like `save', but derive filename from first sender")) },
195 { "set", &c_set, (G | M | X | TWYRA), 0, MAC, NULL
196 DS(N_("Print all variables, or set (a) <variable>(s)")) },
197 { "unalias", &c_unalias, (M | TWYRA), 1, MAC, NULL
198 DS(N_("Un`alias' <name-list> (* for all)")) },
199 { "write", &c_write, (A | TSTRING), 0, 0, NULL
200 DS(N_("Write (append) to <file>")) },
201 { "from", &c_from, (A | TMSGLST), 0, MMNORM, NULL
202 DS(N_("Type (matching) headers of <msglist> (a search specification)")) },
203 { "search", &c_from, (A | TMSGLST), 0, MMNORM, NULL
204 DS(N_("Search for <msglist>, type matching headers")) },
205 { "file", &c_file, (M | T | TWYRA), 0, 1, NULL
206 DS(N_("Open a new <mailbox> or show the current one")) },
207 { "followup", &c_followup, (A | I | R | S | TMSGLST), 0, MMNDEL, NULL
208 DS(N_("Like `reply', but derive filename from first sender")) },
209 { "followupall", &c_followupall, (A | I | R | S | TMSGLST), 0, MMNDEL, NULL
210 DS(N_("Like `reply', but derive filename from first sender")) },
211 { "followupsender", &c_followupsender, (A | I | R | S | TMSGLST),
212 0, MMNDEL, NULL
213 DS(N_("Like `Followup', but always reply to the sender only")) },
214 { "folder", &c_file, (M | T | TWYRA), 0, 1, NULL
215 DS(N_("Open a new <mailbox> or show the current one")) },
216 { "folders", &c_folders, (M | T | TWYRA), 0, 1, NULL
217 DS(N_("List mailboxes below the given or the global folder")) },
218 { "headers", &c_headers, (A | M | TMSGLST), 0, MMNDEL, NULL
219 DS(N_("Type a page of headers (with the first of <msglist> if given)")) },
220 { "help", &a_ctab_c_help, (M | X | TWYRA), 0, 1, NULL
221 DS(N_("Show help [[Option] for the given command]]")) },
222 { n_qm, &a_ctab_c_help, (M | X | TWYRA), 0, 1, NULL
223 DS(N_("Show help [[Option] for the given command]]")) },
224 { "Reply", &c_Reply, (A | I | R | S | EM | TMSGLST), 0, MMNDEL, NULL
225 DS(N_("Reply to originator, exclusively")) },
226 { "Respond", &c_Reply, (A | I | R | S | EM | TMSGLST), 0, MMNDEL, NULL
227 DS(N_("Reply to originator, exclusively")) },
228 { "Followup", &c_Followup, (A | I | R | S | EM | TMSGLST), 0, MMNDEL, NULL
229 DS(N_("Like `Reply', but derive filename from first sender")) },
230 { "reply", &c_reply, (A | I | R | S | EM | TMSGLST), 0, MMNDEL, NULL
231 DS(N_("Reply to originator and recipients of <msglist>")) },
232 { "replyall", &c_replyall, (A | I | R | S | EM | TMSGLST), 0, MMNDEL, NULL
233 DS(N_("Reply to originator and recipients of <msglist>")) },
234 { "replysender", &c_replysender, (A | I | R | S | EM | TMSGLST),
235 0, MMNDEL, NULL
236 DS(N_("Reply to originator, exclusively")) },
237 { "respond", &c_reply, (A | I | R | S | EM | TMSGLST), 0, MMNDEL, NULL
238 DS(N_("Reply to originators and recipients of <msglist>")) },
239 { "respondall", &c_replyall, (A | I | R | S | EM | TMSGLST), 0, MMNDEL, NULL
240 DS(N_("Reply to originators and recipients of <msglist>")) },
241 { "respondsender", &c_replysender, (A | I | R | S | EM | TMSGLST),
242 0, MMNDEL, NULL
243 DS(N_("Reply to originator, exclusively")) },
244 { "Resend", &c_Resend, (A | R | S | EM | TSTRING), 0, MMNDEL, NULL
245 DS(N_("Like `resend', but don't add Resent-* header lines")) },
246 { "Redirect", &c_Resend, (O | A | R | S | EM | TSTRING), 0, MMNDEL, NULL
247 DS(N_("Obsolete alternative for `Resend'")) },
248 { "resend", &c_resend, (A | R | S | EM | TSTRING), 0, MMNDEL, NULL
249 DS(N_("Resend <msglist> to <user>, add Resent-* header lines")) },
250 { "redirect", &c_resend, (O | A | R | S | EM | TSTRING), 0, MMNDEL, NULL
251 DS(N_("Obsolete alternative for `resend'")) },
252 { "Forward", &c_Forward, (A | R | S | EM | TSTRING), 0, MMNDEL, NULL
253 DS(N_("Like `forward', but derive filename from <address>")) },
254 { "Fwd", &c_Forward, (O | A | R | S | EM | TSTRING), 0, MMNDEL, NULL
255 DS(N_("Alias of `Forward'")) },
256 { "forward", &c_forward, (A | R | S | EM | TSTRING), 0, MMNDEL, NULL
257 DS(N_("Forward <message> to <address>")) },
258 { "fwd", &c_forward, (O | A | R | S | EM | TSTRING), 0, MMNDEL, NULL
259 DS(N_("Alias of `forward'")) },
260 { "edit", &c_editor, (G | A | I | S | TMSGLST), 0, MMNORM, NULL
261 DS(N_("Edit <msglist>")) },
262 { "pipe", &c_pipe, (A | TSTRING), 0, MMNDEL, NULL
263 DS(N_("Pipe <msglist> to <command>, honouring `ignore' / `retain'")) },
264 { "|", &c_pipe, (A | TSTRING), 0, MMNDEL, NULL
265 DS(N_("Pipe <msglist> to <command>, honouring `ignore' / `retain'")) },
266 { "Pipe", &c_Pipe, (A | TSTRING), 0, MMNDEL, NULL
267 DS(N_("Like `pipe', but bypass `ignore' / `retain'")) },
268 { "size", &c_messize, (A | TMSGLST), 0, MMNDEL, NULL
269 DS(N_("Show size in bytes for <msglist>")) },
270 { "hold", &c_preserve, (A | S | W | TMSGLST), 0, MMNDEL, NULL
271 DS(N_("Save <msglist> in system mailbox instead of *MBOX*")) },
272 { "if", &c_if, (G | F | M | X | TRAWLST), 1, MAC, NULL
273 DS(N_("Part of the if..elif..else..endif statement")) },
274 { "else", &c_else, (G | F | M | X | TWYSH), 0, 0, NULL
275 DS(N_("Part of the if..elif..else..endif statement")) },
276 { "elif", &c_elif, (G | F | M | X | TRAWLST), 1, MAC, NULL
277 DS(N_("Part of the if..elif..else..endif statement")) },
278 { "endif", &c_endif, (G | F | M | X | TWYSH), 0, 0, NULL
279 DS(N_("Part of the if..elif..else..endif statement")) },
280 { "alternates", &c_alternates, (M | V | TWYSH), 0, MAC, NULL
281 DS(N_("Show or define alternate <address-list> for the invoking user")) },
282 { "unalternates", &c_unalternates, (M | TWYSH), 1, MAC, NULL
283 DS(N_("Delete alternate <address-list> (* for all)")) },
284 { "ignore", &c_ignore, (M | TWYRA), 0, MAC, NULL
285 DS(N_("Add <header-list> to the ignored LIST, or show that list")) },
286 { "discard", &c_ignore, (M | TWYRA), 0, MAC, NULL
287 DS(N_("Add <header-list> to the ignored LIST, or show that list")) },
288 { "retain", &c_retain, (M | TWYRA), 0, MAC, NULL
289 DS(N_("Add <header-list> to retained list, or show that list")) },
290 { "saveignore", &c_saveignore, (O | M | TRAWLST), 0, MAC, NULL
291 DS(N_("Obsoleted by `headerpick'")) },
292 { "savediscard", &c_saveignore, (O | M | TRAWLST), 0, MAC, NULL
293 DS(N_("Obsoleted by `headerpick'")) },
294 { "saveretain", &c_saveretain, (O | M | TRAWLST), 0, MAC, NULL
295 DS(N_("Obsoleted by `headerpick'")) },
296 { "unignore", &c_unignore, (M | TWYRA), 0, MAC, NULL
297 DS(N_("Un`ignore' <header-list>")) },
298 { "unretain", &c_unretain, (M | TWYRA), 0, MAC, NULL
299 DS(N_("Un`retain' <header-list>")) },
300 { "unsaveignore", &c_unsaveignore, (O | M | TRAWLST), 0, MAC, NULL
301 DS(N_("Obsoleted by `unheaderpick'")) },
302 { "unsaveretain", &c_unsaveretain, (O | M | TRAWLST), 0, MAC, NULL
303 DS(N_("Obsoleted by `unheaderpick'")) },
304 { "newmail", &c_newmail, (A | T | TWYSH), 0, 0, NULL
305 DS(N_("Check for new mail in current folder")) },
306 { "shortcut", &c_shortcut, (M | TWYRA), 0, MAC, NULL
307 DS(N_("Define <shortcut>s and their <expansion>, or list shortcuts")) },
308 { "unshortcut", &c_unshortcut, (M | TWYRA), 1, MAC, NULL
309 DS(N_("Delete <shortcut-list> (* for all)")) },
310 { "thread", &c_thread, (O | A | TMSGLST), 0, 0, NULL
311 DS(N_("Obsoleted by `sort' \"thread\"")) },
312 { "unthread", &c_unthread, (O | A | TMSGLST), 0, 0, NULL
313 DS(N_("Obsolete (use `unsort')")) },
314 { "sort", &c_sort, (A | TWYSH), 0, 1, NULL
315 DS(N_("Change sorting to: date,from,size,spam,status,subject,thread,to"))},
316 { "unsort", &c_unthread, (A | TMSGLST), 0, 0, NULL
317 DS(N_("Disable sorted or threaded mode")) },
318 { "flag", &c_flag, (A | M | TMSGLST), 0, 0, NULL
319 DS(N_("(Un)Flag <msglist> (for special attention)")) },
320 { "unflag", &c_unflag, (A | M | TMSGLST), 0, 0, NULL
321 DS(N_("(Un)Flag <msglist> (for special attention)")) },
322 { "answered", &c_answered, (A | M | TMSGLST), 0, 0, NULL
323 DS(N_("Mark the given <msglist> as answered")) },
324 { "unanswered", &c_unanswered, (A | M | TMSGLST), 0, 0, NULL
325 DS(N_("Un`answered' <msglist>")) },
326 { "draft", &c_draft, (A | M | TMSGLST), 0, 0, NULL
327 DS(N_("Mark <msglist> as draft")) },
328 { "undraft", &c_undraft, (A | M | TMSGLST), 0, 0, NULL
329 DS(N_("Un`draft' <msglist>")) },
330 { "move", &c_move, (A | M | TSTRING), 0, 0, NULL
331 DS(N_("Like `copy', but mark messages for deletion")) },
332 { "mv", &c_move, (A | M | TSTRING), 0, 0, NULL
333 DS(N_("Like `copy', but mark messages for deletion")) },
334 { "Move", &c_Move, (A | M | S | TSTRING), 0, 0, NULL
335 DS(N_("Like `move', but derive filename from first sender")) },
336 { "Mv", &c_Move, (A | M | S | TSTRING), 0, 0, NULL
337 DS(N_("Like `move', but derive filename from first sender")) },
338 { "noop", &c_noop, (A | M | TWYSH), 0, 0, NULL
339 DS(N_("NOOP command if current `file' is accessed via network")) },
340 { "collapse", &c_collapse, (A | TMSGLST), 0, 0, NULL
341 DS(N_("Collapse thread views for <msglist>")) },
342 { "uncollapse", &c_uncollapse, (A | TMSGLST), 0, 0, NULL
343 DS(N_("Uncollapse <msglist> if in threaded view")) },
344 { "verify",
345 #ifdef HAVE_XSSL
346 &c_verify,
347 #else
348 NULL,
349 #endif
350 (A | TMSGLST), 0, 0, NULL
351 DS(N_("Verify <msglist>")) },
352 { "decrypt", &c_decrypt, (A | M | TSTRING), 0, 0, NULL
353 DS(N_("Like `copy', but decrypt first, if encrypted")) },
354 { "Decrypt", &c_Decrypt, (A | M | S | TSTRING), 0, 0, NULL
355 DS(N_("Like `decrypt', but derive filename from first sender")) },
356 { "certsave",
357 #ifdef HAVE_SSL
358 &c_certsave,
359 #else
360 NULL,
361 #endif
362 (A | TSTRING), 0, 0, NULL
363 DS(N_("Save S/MIME certificates of <msglist> to <file>")) },
364 { "rename", &c_rename, (M | TWYRA), 0, 2, NULL
365 DS(N_("Rename <existing-folder> to <new-folder>")) },
366 { "remove", &c_remove, (M | TWYRA), 0, MAC, NULL
367 DS(N_("Remove the named folders")) },
368 { "show", &c_show, (A | TMSGLST), 0, MMNDEL, NULL
369 DS(N_("Like `type', but show raw message content of <msglist>")) },
370 { "Show", &c_show, (A | TMSGLST), 0, MMNDEL, NULL
371 DS(N_("Like `Type', but show raw message content of <msglist>")) },
372 { "mimeview", &c_mimeview, (A | I | EM | TMSGLST), 0, MMNDEL, NULL
373 DS(N_("Show non-text parts of the given <message>")) },
374 { "seen", &c_seen, (A | M | TMSGLST), 0, MMNDEL, NULL
375 DS(N_("Mark <msglist> as seen")) },
376 { "Seen", &c_seen, (A | M | TMSGLST), 0, MMNDEL, NULL
377 DS(N_("Mark <msglist> as seen")) },
378 { "fwdignore", &c_fwdignore, (O | M | TRAWLST), 0, MAC, NULL
379 DS(N_("Obsoleted by `headerpick'")) },
380 { "fwddiscard", &c_fwdignore, (O | M | TRAWLST), 0, MAC, NULL
381 DS(N_("Obsoleted by `headerpick'")) },
382 { "fwdretain", &c_fwdretain, (O | M | TRAWLST), 0, MAC, NULL
383 DS(N_("Obsoleted by `headerpick'")) },
384 { "unfwdignore", &c_unfwdignore, (O | M | TRAWLST), 0, MAC, NULL
385 DS(N_("Obsoleted by `unheaderpick'")) },
386 { "unfwdretain", &c_unfwdretain, (O | M | TRAWLST), 0, MAC, NULL
387 DS(N_("Obsoleted by `unheaderpick'")) },
388 { "mimetype", &c_mimetype, (M | TWYRA), 0, MAC, NULL
389 DS(N_("(Load and) show all known MIME types, or define some")) },
390 { "unmimetype", &c_unmimetype, (M | TWYRA), 1, MAC, NULL
391 DS(N_("Delete <type>s (reset, * for all; former reinitializes)")) },
393 { "spamclear",
394 #ifdef HAVE_SPAM
395 &c_spam_clear,
396 #else
397 NULL,
398 #endif
399 (A | M | TMSGLST), 0, MMNDEL, NULL
400 DS(N_("Clear the spam flag for each message in <msglist>")) },
401 { "spamset",
402 #ifdef HAVE_SPAM
403 &c_spam_set,
404 #else
405 NULL,
406 #endif
407 (A | M | TMSGLST), 0, MMNDEL, NULL
408 DS(N_("Set the spam flag for each message in <msglist>")) },
409 { "spamforget",
410 #ifdef HAVE_SPAM
411 &c_spam_forget,
412 #else
413 NULL,
414 #endif
415 (A | M | TMSGLST), 0, MMNDEL, NULL
416 DS(N_("Force the spam detector to unlearn <msglist>")) },
417 { "spamham",
418 #ifdef HAVE_SPAM
419 &c_spam_ham,
420 #else
421 NULL,
422 #endif
423 (A | M | TMSGLST), 0, MMNDEL, NULL
424 DS(N_("Teach the spam detector that <msglist> is ham")) },
425 { "spamrate",
426 #ifdef HAVE_SPAM
427 &c_spam_rate,
428 #else
429 NULL,
430 #endif
431 (A | M | TMSGLST), 0, MMNDEL, NULL
432 DS(N_("Rate <msglist> via the spam detector")) },
433 { "spamspam",
434 #ifdef HAVE_SPAM
435 &c_spam_spam,
436 #else
437 NULL,
438 #endif
439 (A | M | TMSGLST), 0, MMNDEL, NULL
440 DS(N_("Teach the spam detector that <msglist> is spam")) },
442 { "File", &c_File, (M | T | TWYRA), 0, 1, NULL
443 DS(N_("Open a new mailbox readonly, or show the current mailbox")) },
444 { "Folder", &c_File, (M | T | TWYRA), 0, 1, NULL
445 DS(N_("Open a new mailbox readonly, or show the current mailbox")) },
446 { "mlist", &c_mlist, (M | TWYRA), 0, MAC, NULL
447 DS(N_("Show all known mailing lists or define some")) },
448 { "unmlist", &c_unmlist, (M | TWYRA), 1, MAC, NULL
449 DS(N_("Un`mlist' <name-list> (* for all)")) },
450 { "mlsubscribe", &c_mlsubscribe, (M | TWYRA), 0, MAC, NULL
451 DS(N_("Show all mailing list subscriptions or define some")) },
452 { "unmlsubscribe", &c_unmlsubscribe, (M | TWYRA), 1, MAC, NULL
453 DS(N_("Un`mlsubscribe' <name-list> (* for all)"))},
454 { "Lreply", &c_Lreply, (A | I | R | S | EM | TMSGLST), 0, MMNDEL, NULL
455 DS(N_("Mailing-list reply to the given <msglist>")) },
456 { "dotmove", &c_dotmove, (A | TSTRING), 1, 1, NULL
457 DS(N_("Move the dot up <-> or down <+> by one")) },
459 /* New-style commands without un* counterpart */
461 { "=", &c_pdot, (A | TWYSH), 0, 0, NULL
462 DS(N_("Show current message number")) },
464 { "call", &c_call, (M | X | EM | TARG), 0, 0,
465 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_call)
466 DS(N_("Call macro <name> [:<arg>:]")) },
467 { "call_if", &c_call_if, (M | X | EM | TARG), 0, 0,
468 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_call)
469 DS(N_("Call macro <name> like `call', but be silent if non-existent")) },
470 { "cwd", &c_cwd, (M | V | X | TWYSH), 0, 0, NULL
471 DS(N_("Print current working directory (CWD)")) },
473 { "echo", &c_echo, (G | M | X | TWYSH), 0, MAC, NULL
474 DS(N_("Echo arguments, and a trailing newline, to standard output")) },
475 { "echoerr", &c_echoerr, (G | M | X | TWYSH), 0, MAC, NULL
476 DS(N_("Echo arguments, and a trailing newline, to standard error")) },
477 { "echon", &c_echon, (G | M | X | TWYSH), 0, MAC, NULL
478 DS(N_("Echo arguments, without a trailing newline, to standard output")) },
479 { "echoerrn", &c_echoerrn, (G | M | X | TWYSH), 0, MAC, NULL
480 DS(N_("Echo arguments, without a trailing newline, to standard error")) },
481 { "environ", &c_environ, (G | M | X | TWYSH), 2, MAC, NULL
482 DS(N_("<link|set|unset> (an) environment <variable>(s)")) },
483 { "errors",
484 #ifdef HAVE_ERRORS
485 &c_errors,
486 #else
487 NULL,
488 #endif
489 (H | I | M | TWYSH), 0, 1, NULL
490 DS(N_("Either [<show>] or <clear> the error message ring")) },
491 { "eval", &c_eval, (G | M | X | EM | TWYSH), 1, MAC, NULL
492 DS(N_("Construct command from :<arguments>:, reuse its $? and $!")) },
493 { "exit", &c_exit, (M | X | TWYSH), 0, 1, NULL
494 DS(N_("Immediately return [<status>] to the shell without saving")) },
496 { "history",
497 #ifdef HAVE_HISTORY
498 &c_history,
499 #else
500 NULL,
501 #endif
502 (H | I | M | TWYSH), 0, 1, NULL
503 DS(N_("<show> (default), <clear> or select <NO> from editor history")) },
505 { "list", &a_ctab_c_list, (M | TWYSH), 0, 1, NULL
506 DS(N_("List all commands (with argument: in prefix search order)")) },
507 { "localopts", &c_localopts, (H | M | X | TWYSH), 1, 2, NULL
508 DS(N_("Localize variable modifications? [<attribute>] <boolean>"))},
510 { "netrc",
511 #ifdef HAVE_NETRC
512 &c_netrc,
513 #else
514 NULL,
515 #endif
516 (M | TWYSH), 0, 1, NULL
517 DS(N_("[<show>], <load> or <clear> the .netrc cache")) },
519 { "quit", &c_quit, TWYSH, 0, 1, NULL
520 DS(N_("Exit session with [<status>], saving messages as necessary")) },
522 { "read", &c_read, (G | M | X | EM | TWYSH), 1, MAC, NULL
523 DS(N_("Read a line from standard input into <variable>(s)")) },
524 { "readctl", &c_readctl, (G | M | X | EM | TARG), 0, 0,
525 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_readctl)
526 DS(N_(
527 "[<show>], <create> <spec>, <set> <spec>, <remove> <spec> read channels")
529 { "return", &c_return, (M | X | EM | TWYSH), 0, 2, NULL
530 DS(N_("Return control [with <return value> [<exit status>]] from macro"))},
532 { "shell", &c_dosh, (I | S | EM | TWYSH), 0, 0, NULL
533 DS(N_("Invoke an interactive shell")) },
534 { "shift", &c_shift, (M | X | TWYSH), 0, 1, NULL
535 DS(N_("In a `call'ed macro, shift positional parameters")) },
536 { "sleep", &c_sleep, (H | M | X | EM | TWYSH), 1, 3, NULL
537 DS(N_("Sleep for <seconds> [<milliseconds>]"))},
538 { "source", &c_source, (M | TWYSH), 1, 1, NULL
539 DS(N_("Read commands from <file>")) },
540 { "source_if", &c_source_if, (M | TWYSH), 1, 1, NULL
541 DS(N_("If <file> can be opened successfully, read commands from it")) },
543 { "unset", &c_unset, (G | M | X | TWYSH), 1, MAC, NULL
544 DS(N_("Unset <option-list>")) },
546 { "varshow", &c_varshow, (G | M | X | TWYSH), 1, MAC, NULL
547 DS(N_("Show some informations about the given <variables>")) },
548 { "varedit", &c_varedit, (G | I | M | TWYSH), 1, MAC, NULL
549 DS(N_("Edit the value(s) of (an) variable(s), or create them")) },
550 { "vexpr", &c_vexpr, (G | M | V | X | EM | TWYSH), 2, MAC, NULL
551 DS(N_("Evaluate according to <operator> any :<arguments>:")) },
552 { "vpospar", &c_vpospar, (G | M | V | X | EM | TARG), 0, 0,
553 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_vpospar)
554 DS(N_("Positional parameters: <clear>, <quote>, or <set> from :<arg>:"))},
556 { "version", &c_version, (H | M | X | TWYSH), 0, 0, NULL
557 DS(N_("Show the version and feature set of the program")) },
559 { "xit"/*POSIX, first!*/, &c_exit, (M | X | TWYSH), 0, 1, NULL
560 DS(N_("Immediately return [<status>] to the shell without saving")) },
561 { "xcall", &c_xcall, (M | X | EM | TARG), 0, 0,
562 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_call)
563 DS(N_("Replace currently executing macro with macro <name> [:<arg>:]")) },
565 { "z", &c_scroll, (A | M | TWYSH), 0, 1, NULL
566 DS(N_("Scroll header display as indicated by the argument (0,-,+,$)")) },
567 { "Z", &c_Scroll, (A | M | TWYSH), 0, 1, NULL
568 DS(N_("Like `z', but continues to the next flagged message")) },
570 /* New-style commands with un* counterpart */
572 { "account", &c_account, (M | TWYSH), 0, MAC, NULL
573 DS(N_("Create or select <account>, or list all accounts")) },
574 { "unaccount", &c_unaccount, (M | TWYSH), 1, MAC, NULL
575 DS(N_("Delete all given <accounts> (* for all)")) },
577 { "bind",
578 #ifdef HAVE_KEY_BINDINGS
579 &c_bind,
580 #else
581 NULL,
582 #endif
583 (M | TARG), 1, MAC, n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_bind)
584 DS(N_("For <context> (base), [<show>] or bind <key[:,key:]> [:<data>:]"))},
585 { "unbind",
586 #ifdef HAVE_KEY_BINDINGS
587 &c_unbind,
588 #else
589 NULL,
590 #endif
591 (M | TARG), 2, 2, n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_unbind)
592 DS(N_("Un`bind' <context> <key[:,key:]> (* for all)")) },
594 { "charsetalias", &c_charsetalias, (M | TWYSH), 0, MAC, NULL
595 DS(N_("Define [:<charset> <charset-alias>:]s, or list mappings")) },
596 { "uncharsetalias", &c_uncharsetalias, (M | TWYSH), 1, MAC, NULL
597 DS(N_("Delete <charset-mapping-list> (* for all)")) },
599 { "colour",
600 #ifdef HAVE_COLOUR
601 &c_colour,
602 #else
603 NULL,
604 #endif
605 (M | TWYSH), 1, 4, NULL
606 DS(N_("Show colour settings of <type> (1,8,256,all/*) or define one")) },
607 { "uncolour",
608 #ifdef HAVE_COLOUR
609 &c_uncolour,
610 #else
611 NULL,
612 #endif
613 (M | TWYSH), 2, 3, NULL
614 DS(N_("Un`colour' <type> <mapping> (* for all) [<precondition>]")) },
616 { "commandalias", &c_commandalias, (M | X | TWYSH), 0, MAC, NULL
617 DS(N_("Print/create command <alias> [<command>], or list all aliases")) },
618 { "uncommandalias", &c_uncommandalias, (M | X | TWYSH), 1, MAC, NULL
619 DS(N_("Delete <command-alias-list> (* for all)")) },
620 { "ghost", &c_commandalias, (O | M | X | TWYRA), 0, MAC, NULL
621 DS(N_("Obsoleted by `commandalias'")) },
622 { "unghost", &c_uncommandalias, (O | M | X | TWYRA), 1, MAC, NULL
623 DS(N_("Obsoleted by `uncommandalias'")) },
625 { "define", &c_define, (M | X | TWYSH), 0, 2, NULL
626 DS(N_("Define a <macro> or show the currently defined ones")) },
627 { "undefine", &c_undefine, (M | X | TWYSH), 1, MAC, NULL
628 DS(N_("Un`define' all given <macros> (* for all)")) },
630 { "filetype", &c_filetype, (M | TWYSH), 0, MAC, NULL
631 DS(N_("Create [:<extension> <load-cmd> <save-cmd>:] "
632 "or list file handlers"))},
633 { "unfiletype", &c_unfiletype, (M | TWYSH), 1, MAC, NULL
634 DS(N_("Delete file handler for [:<extension>:] (* for all)")) },
636 { "headerpick", &c_headerpick, (M | TWYSH), 0, MAC, NULL
637 DS(N_("Header selection: [<context> [<type> [<header-list>]]]"))},
638 { "unheaderpick", &c_unheaderpick, (M | TWYSH), 3, MAC, NULL
639 DS(N_("Header deselection: <context> <type> <header-list>"))},
641 /* Codec commands */
643 { "addrcodec", &c_addrcodec, (G | M | V | X | EM | TRAWDAT), 0, 0, NULL
644 DS(N_("Email address <[+[+[+]]]e[ncode]|d[ecode]|s[kin]> <rest-of-line>"))},
646 { "shcodec", &c_shcodec, (G | M | V | X | EM | TRAWDAT), 0, 0, NULL
647 DS(N_("Shell quoting: <[+]e[ncode]|d[ecode]> <rest-of-line>")) },
649 { "urlcodec", &c_urlcodec, (G | M | V | X | EM | TRAWDAT), 0, 0, NULL
650 DS(N_("URL percent <[path]e[ncode]|[path]d[ecode]> <rest-of-line>")) },
651 { "urlencode", &c_urlencode, (O | G | M | X | TWYRA), 1, MAC, NULL
652 DS(N_("Obsoleted by `urlcodec'")) },
653 { "urldecode", &c_urldecode, (O | G | M | X | TWYRA), 1, MAC, NULL
654 DS(N_("Obsoleted by `urlcodec'")) }
656 #ifdef HAVE_MEMORY_DEBUG
657 ,{ "memtrace", &c_memtrace, (I | M | TWYSH), 0, 0, NULL
658 DS(N_("Trace current memory usage afap")) }
659 #endif
660 #ifdef HAVE_DEVEL
661 ,{ "sigstate", &c_sigstate, (I | M | TWYSH), 0, 0, NULL
662 DS(N_("Show signal handler states")) }
663 #endif
665 /* Obsolete stuff */
667 #ifdef HAVE_IMAP
668 ,{ "imap", &c_imap_imap, (A | TSTRING), 0, MAC, NULL
669 DS(N_("Send command strings directly to the IMAP server")) },
670 { "connect", &c_connect, (A | TSTRING), 0, 0, NULL
671 DS(N_("If disconnected, connect to IMAP mailbox")) },
672 { "disconnect", &c_disconnect, (A | TNDMLST), 0, 0, NULL
673 DS(N_("If connected, disconnect from IMAP mailbox")) },
674 { "cache", &c_cache, (A | TMSGLST), 0, 0, NULL
675 DS(N_("Read specified <message list> into the IMAP cache")) },
677 { "imapcodec", &c_imapcodec, (G | M | V | X | TRAWDAT), 0, 0, NULL
678 DS(N_("IMAP mailbox name <e[ncode]|d[ecode]> <rest-of-line>")) }
679 #endif
681 #undef DS
683 #undef MAC
685 #undef TMSGLST
686 #undef TNDMLST
687 #undef TRAWDAT
688 # undef TSTRING
689 #undef TWYSH
690 # undef TRAWLST
691 # undef TWYRA
692 #undef TARG
694 #undef A
695 #undef F
696 #undef G
697 #undef H
698 #undef I
699 #undef M
700 #undef O
701 #undef P
702 #undef R
703 #undef T
704 #undef V
705 #undef W
706 #undef X
707 #undef EM
709 #endif /* n_CMD_TAB_H */
711 /* s-it-mode */