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