ignore.c: (just) (satisfy) scan-build
[s-mailx.git] / cmd-tab.h
blob3284d58abcc6355e734751bc30bb8667760b3c2e
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 | TSTRING), 0, 0, NULL
160 DS(N_("Compose mail; recipients may be given as arguments")) },
161 { "Mail", &c_Sendmail, (I | M | R | S | 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 | TMSGLST), 0, MMNDEL, NULL
225 DS(N_("Reply to originator, exclusively")) },
226 { "Respond", &c_Reply, (A | I | R | S | TMSGLST), 0, MMNDEL, NULL
227 DS(N_("Reply to originator, exclusively")) },
228 { "Followup", &c_Followup, (A | I | R | S | TMSGLST), 0, MMNDEL, NULL
229 DS(N_("Like `Reply', but derive filename from first sender")) },
230 { "reply", &c_reply, (A | I | R | S | TMSGLST), 0, MMNDEL, NULL
231 DS(N_("Reply to originator and recipients of <msglist>")) },
232 { "replyall", &c_replyall, (A | I | R | S | TMSGLST), 0, MMNDEL, NULL
233 DS(N_("Reply to originator and recipients of <msglist>")) },
234 { "replysender", &c_replysender, (A | I | R | S | TMSGLST), 0, MMNDEL, NULL
235 DS(N_("Reply to originator, exclusively")) },
236 { "respond", &c_reply, (A | I | R | S | TMSGLST), 0, MMNDEL, NULL
237 DS(N_("Reply to originators and recipients of <msglist>")) },
238 { "respondall", &c_replyall, (A | I | R | S | TMSGLST), 0, MMNDEL, NULL
239 DS(N_("Reply to originators and recipients of <msglist>")) },
240 { "respondsender", &c_replysender, (A | I | R | S | TMSGLST),0, MMNDEL, NULL
241 DS(N_("Reply to originator, exclusively")) },
242 { "Resend", &c_Resend, (A | R | S | TSTRING), 0, MMNDEL, NULL
243 DS(N_("Like `resend', but don't add Resent-* header lines")) },
244 { "Redirect", &c_Resend, (O | A | R | S | TSTRING), 0, MMNDEL, NULL
245 DS(N_("Obsolete alternative for `Resend'")) },
246 { "resend", &c_resend, (A | R | S | TSTRING), 0, MMNDEL, NULL
247 DS(N_("Resend <msglist> to <user>, add Resent-* header lines")) },
248 { "redirect", &c_resend, (O | A | R | S | TSTRING), 0, MMNDEL, NULL
249 DS(N_("Obsolete alternative for `resend'")) },
250 { "Forward", &c_Forward, (A | R | S | TSTRING), 0, MMNDEL, NULL
251 DS(N_("Like `forward', but derive filename from <address>")) },
252 { "Fwd", &c_Forward, (O | A | R | S | TSTRING), 0, MMNDEL, NULL
253 DS(N_("Alias of `Forward'")) },
254 { "forward", &c_forward, (A | R | S | TSTRING), 0, MMNDEL, NULL
255 DS(N_("Forward <message> to <address>")) },
256 { "fwd", &c_forward, (O | A | R | S | TSTRING), 0, MMNDEL, NULL
257 DS(N_("Alias of `forward'")) },
258 { "edit", &c_editor, (G | A | I | S | TMSGLST), 0, MMNORM, NULL
259 DS(N_("Edit <msglist>")) },
260 { "pipe", &c_pipe, (A | TSTRING), 0, MMNDEL, NULL
261 DS(N_("Pipe <msglist> to <command>, honouring `ignore' / `retain'")) },
262 { "|", &c_pipe, (A | TSTRING), 0, MMNDEL, NULL
263 DS(N_("Pipe <msglist> to <command>, honouring `ignore' / `retain'")) },
264 { "Pipe", &c_Pipe, (A | TSTRING), 0, MMNDEL, NULL
265 DS(N_("Like `pipe', but bypass `ignore' / `retain'")) },
266 { "size", &c_messize, (A | TMSGLST), 0, MMNDEL, NULL
267 DS(N_("Show size in bytes for <msglist>")) },
268 { "hold", &c_preserve, (A | S | W | TMSGLST), 0, MMNDEL, NULL
269 DS(N_("Save <msglist> in system mailbox instead of *MBOX*")) },
270 { "if", &c_if, (G | F | M | X | TRAWLST), 1, MAC, NULL
271 DS(N_("Part of the if..elif..else..endif statement")) },
272 { "else", &c_else, (G | F | M | X | TWYSH), 0, 0, NULL
273 DS(N_("Part of the if..elif..else..endif statement")) },
274 { "elif", &c_elif, (G | F | M | X | TRAWLST), 1, MAC, NULL
275 DS(N_("Part of the if..elif..else..endif statement")) },
276 { "endif", &c_endif, (G | F | M | X | TWYSH), 0, 0, NULL
277 DS(N_("Part of the if..elif..else..endif statement")) },
278 { "alternates", &c_alternates, (M | TWYRA), 0, MAC, NULL
279 DS(N_("Show or define an alternate address list for the invoking user")) },
280 { "ignore", &c_ignore, (M | TWYRA), 0, MAC, NULL
281 DS(N_("Add <header-list> to the ignored LIST, or show that list")) },
282 { "discard", &c_ignore, (M | TWYRA), 0, MAC, NULL
283 DS(N_("Add <header-list> to the ignored LIST, or show that list")) },
284 { "retain", &c_retain, (M | TWYRA), 0, MAC, NULL
285 DS(N_("Add <header-list> to retained list, or show that list")) },
286 { "saveignore", &c_saveignore, (O | M | TRAWLST), 0, MAC, NULL
287 DS(N_("Obsoleted by `headerpick'")) },
288 { "savediscard", &c_saveignore, (O | M | TRAWLST), 0, MAC, NULL
289 DS(N_("Obsoleted by `headerpick'")) },
290 { "saveretain", &c_saveretain, (O | M | TRAWLST), 0, MAC, NULL
291 DS(N_("Obsoleted by `headerpick'")) },
292 { "unignore", &c_unignore, (M | TWYRA), 0, MAC, NULL
293 DS(N_("Un`ignore' <header-list>")) },
294 { "unretain", &c_unretain, (M | TWYRA), 0, MAC, NULL
295 DS(N_("Un`retain' <header-list>")) },
296 { "unsaveignore", &c_unsaveignore, (O | M | TRAWLST), 0, MAC, NULL
297 DS(N_("Obsoleted by `unheaderpick'")) },
298 { "unsaveretain", &c_unsaveretain, (O | M | TRAWLST), 0, MAC, NULL
299 DS(N_("Obsoleted by `unheaderpick'")) },
300 { "newmail", &c_newmail, (A | T | TWYSH), 0, 0, NULL
301 DS(N_("Check for new mail in current folder")) },
302 { "shortcut", &c_shortcut, (M | TWYRA), 0, MAC, NULL
303 DS(N_("Define <shortcut>s and their <expansion>, or list shortcuts")) },
304 { "unshortcut", &c_unshortcut, (M | TWYRA), 1, MAC, NULL
305 DS(N_("Delete <shortcut-list> (* for all)")) },
306 { "thread", &c_thread, (O | A | TMSGLST), 0, 0, NULL
307 DS(N_("Obsoleted by `sort' \"thread\"")) },
308 { "unthread", &c_unthread, (O | A | TMSGLST), 0, 0, NULL
309 DS(N_("Obsolete (use `unsort')")) },
310 { "sort", &c_sort, (A | TWYSH), 0, 1, NULL
311 DS(N_("Change sorting to: date,from,size,spam,status,subject,thread,to"))},
312 { "unsort", &c_unthread, (A | TMSGLST), 0, 0, NULL
313 DS(N_("Disable sorted or threaded mode")) },
314 { "flag", &c_flag, (A | M | TMSGLST), 0, 0, NULL
315 DS(N_("(Un)Flag <msglist> (for special attention)")) },
316 { "unflag", &c_unflag, (A | M | TMSGLST), 0, 0, NULL
317 DS(N_("(Un)Flag <msglist> (for special attention)")) },
318 { "answered", &c_answered, (A | M | TMSGLST), 0, 0, NULL
319 DS(N_("Mark the given <msglist> as answered")) },
320 { "unanswered", &c_unanswered, (A | M | TMSGLST), 0, 0, NULL
321 DS(N_("Un`answered' <msglist>")) },
322 { "draft", &c_draft, (A | M | TMSGLST), 0, 0, NULL
323 DS(N_("Mark <msglist> as draft")) },
324 { "undraft", &c_undraft, (A | M | TMSGLST), 0, 0, NULL
325 DS(N_("Un`draft' <msglist>")) },
326 { "move", &c_move, (A | M | TSTRING), 0, 0, NULL
327 DS(N_("Like `copy', but mark messages for deletion")) },
328 { "mv", &c_move, (A | M | TSTRING), 0, 0, NULL
329 DS(N_("Like `copy', but mark messages for deletion")) },
330 { "Move", &c_Move, (A | M | S | TSTRING), 0, 0, NULL
331 DS(N_("Like `move', but derive filename from first sender")) },
332 { "Mv", &c_Move, (A | M | S | TSTRING), 0, 0, NULL
333 DS(N_("Like `move', but derive filename from first sender")) },
334 { "noop", &c_noop, (A | M | TWYSH), 0, 0, NULL
335 DS(N_("NOOP command if current `file' is accessed via network")) },
336 { "collapse", &c_collapse, (A | TMSGLST), 0, 0, NULL
337 DS(N_("Collapse thread views for <msglist>")) },
338 { "uncollapse", &c_uncollapse, (A | TMSGLST), 0, 0, NULL
339 DS(N_("Uncollapse <msglist> if in threaded view")) },
340 { "verify",
341 #ifdef HAVE_XSSL
342 &c_verify,
343 #else
344 NULL,
345 #endif
346 (A | TMSGLST), 0, 0, NULL
347 DS(N_("Verify <msglist>")) },
348 { "decrypt", &c_decrypt, (A | M | TSTRING), 0, 0, NULL
349 DS(N_("Like `copy', but decrypt first, if encrypted")) },
350 { "Decrypt", &c_Decrypt, (A | M | S | TSTRING), 0, 0, NULL
351 DS(N_("Like `decrypt', but derive filename from first sender")) },
352 { "certsave",
353 #ifdef HAVE_SSL
354 &c_certsave,
355 #else
356 NULL,
357 #endif
358 (A | TSTRING), 0, 0, NULL
359 DS(N_("Save S/MIME certificates of <msglist> to <file>")) },
360 { "rename", &c_rename, (M | TWYRA), 0, 2, NULL
361 DS(N_("Rename <existing-folder> to <new-folder>")) },
362 { "remove", &c_remove, (M | TWYRA), 0, MAC, NULL
363 DS(N_("Remove the named folders")) },
364 { "show", &c_show, (A | TMSGLST), 0, MMNDEL, NULL
365 DS(N_("Like `type', but show raw message content of <msglist>")) },
366 { "Show", &c_show, (A | TMSGLST), 0, MMNDEL, NULL
367 DS(N_("Like `Type', but show raw message content of <msglist>")) },
368 { "mimeview", &c_mimeview, (A | I | EM | TMSGLST), 0, MMNDEL, NULL
369 DS(N_("Show non-text parts of the given <message>")) },
370 { "seen", &c_seen, (A | M | TMSGLST), 0, MMNDEL, NULL
371 DS(N_("Mark <msglist> as seen")) },
372 { "Seen", &c_seen, (A | M | TMSGLST), 0, MMNDEL, NULL
373 DS(N_("Mark <msglist> as seen")) },
374 { "fwdignore", &c_fwdignore, (O | M | TRAWLST), 0, MAC, NULL
375 DS(N_("Obsoleted by `headerpick'")) },
376 { "fwddiscard", &c_fwdignore, (O | M | TRAWLST), 0, MAC, NULL
377 DS(N_("Obsoleted by `headerpick'")) },
378 { "fwdretain", &c_fwdretain, (O | M | TRAWLST), 0, MAC, NULL
379 DS(N_("Obsoleted by `headerpick'")) },
380 { "unfwdignore", &c_unfwdignore, (O | M | TRAWLST), 0, MAC, NULL
381 DS(N_("Obsoleted by `unheaderpick'")) },
382 { "unfwdretain", &c_unfwdretain, (O | M | TRAWLST), 0, MAC, NULL
383 DS(N_("Obsoleted by `unheaderpick'")) },
384 { "mimetype", &c_mimetype, (M | TWYRA), 0, MAC, NULL
385 DS(N_("(Load and) show all known MIME types, or define some")) },
386 { "unmimetype", &c_unmimetype, (M | TWYRA), 1, MAC, NULL
387 DS(N_("Delete <type>s (reset, * for all; former reinitializes)")) },
389 { "spamclear",
390 #ifdef HAVE_SPAM
391 &c_spam_clear,
392 #else
393 NULL,
394 #endif
395 (A | M | TMSGLST), 0, MMNDEL, NULL
396 DS(N_("Clear the spam flag for each message in <msglist>")) },
397 { "spamset",
398 #ifdef HAVE_SPAM
399 &c_spam_set,
400 #else
401 NULL,
402 #endif
403 (A | M | TMSGLST), 0, MMNDEL, NULL
404 DS(N_("Set the spam flag for each message in <msglist>")) },
405 { "spamforget",
406 #ifdef HAVE_SPAM
407 &c_spam_forget,
408 #else
409 NULL,
410 #endif
411 (A | M | TMSGLST), 0, MMNDEL, NULL
412 DS(N_("Force the spam detector to unlearn <msglist>")) },
413 { "spamham",
414 #ifdef HAVE_SPAM
415 &c_spam_ham,
416 #else
417 NULL,
418 #endif
419 (A | M | TMSGLST), 0, MMNDEL, NULL
420 DS(N_("Teach the spam detector that <msglist> is ham")) },
421 { "spamrate",
422 #ifdef HAVE_SPAM
423 &c_spam_rate,
424 #else
425 NULL,
426 #endif
427 (A | M | TMSGLST), 0, MMNDEL, NULL
428 DS(N_("Rate <msglist> via the spam detector")) },
429 { "spamspam",
430 #ifdef HAVE_SPAM
431 &c_spam_spam,
432 #else
433 NULL,
434 #endif
435 (A | M | TMSGLST), 0, MMNDEL, NULL
436 DS(N_("Teach the spam detector that <msglist> is spam")) },
438 { "File", &c_File, (M | T | TWYRA), 0, 1, NULL
439 DS(N_("Open a new mailbox readonly, or show the current mailbox")) },
440 { "Folder", &c_File, (M | T | TWYRA), 0, 1, NULL
441 DS(N_("Open a new mailbox readonly, or show the current mailbox")) },
442 { "mlist", &c_mlist, (M | TWYRA), 0, MAC, NULL
443 DS(N_("Show all known mailing lists or define some")) },
444 { "unmlist", &c_unmlist, (M | TWYRA), 1, MAC, NULL
445 DS(N_("Un`mlist' <name-list> (* for all)")) },
446 { "mlsubscribe", &c_mlsubscribe, (M | TWYRA), 0, MAC, NULL
447 DS(N_("Show all mailing list subscriptions or define some")) },
448 { "unmlsubscribe", &c_unmlsubscribe, (M | TWYRA), 1, MAC, NULL
449 DS(N_("Un`mlsubscribe' <name-list> (* for all)"))},
450 { "Lreply", &c_Lreply, (A | I | R | S | TMSGLST), 0, MMNDEL, NULL
451 DS(N_("Mailing-list reply to the given <msglist>")) },
452 { "dotmove", &c_dotmove, (A | TSTRING), 1, 1, NULL
453 DS(N_("Move the dot up <-> or down <+> by one")) },
455 /* New-style commands without un* counterpart */
457 { "=", &c_pdot, (A | TWYSH), 0, 0, NULL
458 DS(N_("Show current message number")) },
460 { "call", &c_call, (M | X | EM | TARG), 0, 0,
461 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_call)
462 DS(N_("Call macro <name> [:<arg>:]")) },
463 { "call_if", &c_call_if, (M | X | EM | TARG), 0, 0,
464 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_call)
465 DS(N_("Call macro <name> like `call', but be silent if non-existent")) },
466 { "cwd", &c_cwd, (M | V | X | TWYSH), 0, 0, NULL
467 DS(N_("Print current working directory (CWD)")) },
469 { "echo", &c_echo, (G | M | X | TWYSH), 0, MAC, NULL
470 DS(N_("Echo arguments, and a trailing newline, to standard output")) },
471 { "echoerr", &c_echoerr, (G | M | X | TWYSH), 0, MAC, NULL
472 DS(N_("Echo arguments, and a trailing newline, to standard error")) },
473 { "echon", &c_echon, (G | M | X | TWYSH), 0, MAC, NULL
474 DS(N_("Echo arguments, without a trailing newline, to standard output")) },
475 { "echoerrn", &c_echoerrn, (G | M | X | TWYSH), 0, MAC, NULL
476 DS(N_("Echo arguments, without a trailing newline, to standard error")) },
477 { "environ", &c_environ, (G | M | X | TWYSH), 2, MAC, NULL
478 DS(N_("<link|set|unset> (an) environment <variable>(s)")) },
479 { "errors",
480 #ifdef HAVE_ERRORS
481 &c_errors,
482 #else
483 NULL,
484 #endif
485 (H | I | M | TWYSH), 0, 1, NULL
486 DS(N_("Either [<show>] or <clear> the error message ring")) },
487 { "eval", &c_eval, (G | M | X | EM | TWYSH), 1, MAC, NULL
488 DS(N_("Construct command from :<arguments>:, reuse its $? and $!")) },
489 { "exit", &c_exit, (M | X | TWYSH), 0, 1, NULL
490 DS(N_("Immediately return [<status>] to the shell without saving")) },
492 { "history",
493 #ifdef HAVE_HISTORY
494 &c_history,
495 #else
496 NULL,
497 #endif
498 (H | I | M | TWYSH), 0, 1, NULL
499 DS(N_("<show> (default), <clear> or select <NO> from editor history")) },
501 { "list", &a_ctab_c_list, (M | TWYSH), 0, 1, NULL
502 DS(N_("List all commands (with argument: in prefix search order)")) },
503 { "localopts", &c_localopts, (H | M | X | TWYSH), 1, 1, NULL
504 DS(N_("Inside `define' / `account': isolate modifications? <boolean>"))},
506 { "netrc",
507 #ifdef HAVE_NETRC
508 &c_netrc,
509 #else
510 NULL,
511 #endif
512 (M | TWYSH), 0, 1, NULL
513 DS(N_("[<show>], <load> or <clear> the .netrc cache")) },
515 { "quit", &c_quit, TWYSH, 0, 1, NULL
516 DS(N_("Exit session with [<status>], saving messages as necessary")) },
518 { "read", &c_read, (G | M | X | EM | TWYSH), 1, MAC, NULL
519 DS(N_("Read a line from standard input into <variable>(s)")) },
520 { "readctl", &c_readctl, (G | M | X | EM | TARG), 0, 0,
521 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_readctl)
522 DS(N_(
523 "[<show>], <create> <spec>, <set> <spec>, <remove> <spec> read channels")
525 { "return", &c_return, (M | X | EM | TWYSH), 0, 2, NULL
526 DS(N_("Return control [with <return value> [<exit status>]] from macro"))},
528 { "shell", &c_dosh, (I | S | EM | TWYSH), 0, 0, NULL
529 DS(N_("Invoke an interactive shell")) },
530 { "shift", &c_shift, (M | X | TWYSH), 0, 1, NULL
531 DS(N_("In a `call'ed macro, shift positional parameters")) },
532 { "sleep", &c_sleep, (H | M | X | EM | TWYSH), 1, 3, NULL
533 DS(N_("Sleep for <seconds> [<milliseconds>]"))},
534 { "source", &c_source, (M | TWYSH), 1, 1, NULL
535 DS(N_("Read commands from <file>")) },
536 { "source_if", &c_source_if, (M | TWYSH), 1, 1, NULL
537 DS(N_("If <file> can be opened successfully, read commands from it")) },
539 { "unset", &c_unset, (G | M | X | TWYSH), 1, MAC, NULL
540 DS(N_("Unset <option-list>")) },
542 { "varshow", &c_varshow, (G | M | X | TWYSH), 1, MAC, NULL
543 DS(N_("Show some informations about the given <variables>")) },
544 { "varedit", &c_varedit, (G | I | M | TWYSH), 1, MAC, NULL
545 DS(N_("Edit the value(s) of (an) variable(s), or create them")) },
546 { "vexpr", &c_vexpr, (G | M | V | X | EM | TWYSH), 2, MAC, NULL
547 DS(N_("Evaluate according to <operator> any :<arguments>:")) },
548 { "vpospar", &c_vpospar, (G | M | V | X | EM | TARG), 0, 0,
549 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_vpospar)
550 DS(N_("Positional parameters: <clear>, <quote>, or <set> from :<arg>:"))},
552 { "version", &c_version, (H | M | X | TWYSH), 0, 0, NULL
553 DS(N_("Show the version and feature set of the program")) },
555 { "xit"/*POSIX, first!*/, &c_exit, (M | X | TWYSH), 0, 1, NULL
556 DS(N_("Immediately return [<status>] to the shell without saving")) },
557 { "xcall", &c_xcall, (M | X | EM | TARG), 0, 0,
558 n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_call)
559 DS(N_("Replace currently executing macro with macro <name> [:<arg>:]")) },
561 { "z", &c_scroll, (A | M | TWYSH), 0, 1, NULL
562 DS(N_("Scroll header display as indicated by the argument (0,-,+,$)")) },
563 { "Z", &c_Scroll, (A | M | TWYSH), 0, 1, NULL
564 DS(N_("Like `z', but continues to the next flagged message")) },
566 /* New-style commands with un* counterpart */
568 { "account", &c_account, (M | TWYSH), 0, MAC, NULL
569 DS(N_("Create or select <account>, or list all accounts")) },
570 { "unaccount", &c_unaccount, (M | TWYSH), 1, MAC, NULL
571 DS(N_("Delete all given <accounts> (* for all)")) },
573 { "bind",
574 #ifdef HAVE_KEY_BINDINGS
575 &c_bind,
576 #else
577 NULL,
578 #endif
579 (M | TARG), 1, MAC, n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_bind)
580 DS(N_("For <context> (base), [<show>] or bind <key[:,key:]> [:<data>:]"))},
581 { "unbind",
582 #ifdef HAVE_KEY_BINDINGS
583 &c_unbind,
584 #else
585 NULL,
586 #endif
587 (M | TARG), 2, 2, n_CMD_ARG_DESC_SUBCLASS_CAST(&a_ctab_cad_unbind)
588 DS(N_("Un`bind' <context> <key[:,key:]> (* for all)")) },
590 { "charsetalias", &c_charsetalias, (M | TWYSH), 0, MAC, NULL
591 DS(N_("Define [:<charset> <charset-alias>:]s, or list mappings")) },
592 { "uncharsetalias", &c_uncharsetalias, (M | TWYSH), 1, MAC, NULL
593 DS(N_("Delete <charset-mapping-list> (* for all)")) },
595 { "colour",
596 #ifdef HAVE_COLOUR
597 &c_colour,
598 #else
599 NULL,
600 #endif
601 (M | TWYSH), 1, 4, NULL
602 DS(N_("Show colour settings of <type> (1,8,256,all/*) or define one")) },
603 { "uncolour",
604 #ifdef HAVE_COLOUR
605 &c_uncolour,
606 #else
607 NULL,
608 #endif
609 (M | TWYSH), 2, 3, NULL
610 DS(N_("Un`colour' <type> <mapping> (* for all) [<precondition>]")) },
612 { "commandalias", &c_commandalias, (M | X | TWYSH), 0, MAC, NULL
613 DS(N_("Print/create command <alias> [<command>], or list all aliases")) },
614 { "uncommandalias", &c_uncommandalias, (M | X | TWYSH), 1, MAC, NULL
615 DS(N_("Delete <command-alias-list> (* for all)")) },
616 { "ghost", &c_commandalias, (O | M | X | TWYRA), 0, MAC, NULL
617 DS(N_("Obsoleted by `commandalias'")) },
618 { "unghost", &c_uncommandalias, (O | M | X | TWYRA), 1, MAC, NULL
619 DS(N_("Obsoleted by `uncommandalias'")) },
621 { "define", &c_define, (M | X | TWYSH), 0, 2, NULL
622 DS(N_("Define a <macro> or show the currently defined ones")) },
623 { "undefine", &c_undefine, (M | X | TWYSH), 1, MAC, NULL
624 DS(N_("Un`define' all given <macros> (* for all)")) },
626 { "filetype", &c_filetype, (M | TWYSH), 0, MAC, NULL
627 DS(N_("Create [:<extension> <load-cmd> <save-cmd>:] "
628 "or list file handlers"))},
629 { "unfiletype", &c_unfiletype, (M | TWYSH), 1, MAC, NULL
630 DS(N_("Delete file handler for [:<extension>:] (* for all)")) },
632 { "headerpick", &c_headerpick, (M | TWYSH), 0, MAC, NULL
633 DS(N_("Header selection: [<context> [<type> [<header-list>]]]"))},
634 { "unheaderpick", &c_unheaderpick, (M | TWYSH), 3, MAC, NULL
635 DS(N_("Header deselection: <context> <type> <header-list>"))},
637 /* Codec commands */
639 { "addrcodec", &c_addrcodec, (G | M | V | X | EM | TRAWDAT), 0, 0, NULL
640 DS(N_("Email address <[+[+[+]]]e[ncode]|d[ecode]|s[kin]> <rest-of-line>"))},
642 { "shcodec", &c_shcodec, (G | M | V | X | EM | TRAWDAT), 0, 0, NULL
643 DS(N_("Shell quoting: <[+]e[ncode]|d[ecode]> <rest-of-line>")) },
645 { "urlcodec", &c_urlcodec, (G | M | V | X | EM | TRAWDAT), 0, 0, NULL
646 DS(N_("URL percent <[path]e[ncode]|[path]d[ecode]> <rest-of-line>")) },
647 { "urlencode", &c_urlencode, (O | G | M | X | TWYRA), 1, MAC, NULL
648 DS(N_("Obsoleted by `urlcodec'")) },
649 { "urldecode", &c_urldecode, (O | G | M | X | TWYRA), 1, MAC, NULL
650 DS(N_("Obsoleted by `urlcodec'")) }
652 #ifdef HAVE_MEMORY_DEBUG
653 ,{ "memtrace", &c_memtrace, (I | M | TWYSH), 0, 0, NULL
654 DS(N_("Trace current memory usage afap")) }
655 #endif
656 #ifdef HAVE_DEVEL
657 ,{ "sigstate", &c_sigstate, (I | M | TWYSH), 0, 0, NULL
658 DS(N_("Show signal handler states")) }
659 #endif
661 /* Obsolete stuff */
663 #ifdef HAVE_IMAP
664 ,{ "imap", &c_imap_imap, (A | TSTRING), 0, MAC, NULL
665 DS(N_("Send command strings directly to the IMAP server")) },
666 { "connect", &c_connect, (A | TSTRING), 0, 0, NULL
667 DS(N_("If disconnected, connect to IMAP mailbox")) },
668 { "disconnect", &c_disconnect, (A | TNDMLST), 0, 0, NULL
669 DS(N_("If connected, disconnect from IMAP mailbox")) },
670 { "cache", &c_cache, (A | TMSGLST), 0, 0, NULL
671 DS(N_("Read specified <message list> into the IMAP cache")) },
673 { "imapcodec", &c_imapcodec, (G | M | V | X | TRAWDAT), 0, 0, NULL
674 DS(N_("IMAP mailbox name <e[ncode]|d[ecode]> <rest-of-line>")) }
675 #endif
677 #undef DS
679 #undef MAC
681 #undef TMSGLST
682 #undef TNDMLST
683 #undef TRAWDAT
684 # undef TSTRING
685 #undef TWYSH
686 # undef TRAWLST
687 # undef TWYRA
688 #undef TARG
690 #undef A
691 #undef F
692 #undef G
693 #undef H
694 #undef I
695 #undef M
696 #undef O
697 #undef P
698 #undef R
699 #undef T
700 #undef V
701 #undef W
702 #undef X
703 #undef EM
705 #endif /* n_CMD_TAB_H */
707 /* s-it-mode */