Remove debug-only `core' and `clobber' commands..
[s-mailx.git] / cmd_tab.h
blobd8e5ec05ccb213dae6e3c8b3b5d4b5a391f090d0
1 /*@ S-nail - a mail user agent derived from Berkeley Mail.
2 *@ This header is included by ./lex.c and defines the command array content.
4 * Copyright (c) 2000-2004 Gunnar Ritter, Freiburg i. Br., Germany.
5 * Copyright (c) 2012 - 2014 Steffen "Daode" Nurpmeso <sdaoden@users.sf.net>.
6 */
7 /*
8 * Copyright (c) 1980, 1993
9 * The Regents of the University of California. All rights reserved.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgement:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
40 #ifdef HAVE_DOCSTRINGS
41 # define DS(ID,S) , ID, S
42 #else
43 # define DS(ID,S)
44 #endif
46 /* Note: the first command in here may NOT expand to an unsupported one! */
47 { "next", next, (A | NDMLIST), 0, MMNDEL
48 DS(355, "Goes to the next message (-list) and prints it") },
49 { "alias", group, (M | RAWLIST), 0, 1000
50 DS(304, "Show all or the specified alias(es), or (re)define one") },
51 { "print", type, (A | MSGLIST), 0, MMNDEL
52 DS(361, "Type each message of <message-list> on the terminal") },
53 { "type", type, (A | MSGLIST), 0, MMNDEL
54 DS(361, "Type each message of <message-list> on the terminal") },
55 { "Type", Type, (A | MSGLIST), 0, MMNDEL
56 DS(360, "Like \"print\", but prints all headers and parts") },
57 { "Print", Type, (A | MSGLIST), 0, MMNDEL
58 DS(360, "Like \"print\", but prints all headers and parts") },
59 { "visual", visual, (A | I | MSGLIST), 0, MMNORM
60 DS(326, "Edit <message-list>") },
61 { "top", top, (A | MSGLIST), 0, MMNDEL
62 DS(385, "Print top few lines of <message-list>") },
63 { "touch", stouch, (A | W | MSGLIST), 0, MMNDEL
64 DS(386, "Mark <message-list> for saving in *mbox*") },
65 { "preserve", preserve, (A | W | MSGLIST), 0, MMNDEL
66 DS(344, "Save <message-list> in system mailbox instead of *mbox*") },
67 { "delete", delete, (A | W | P | MSGLIST), 0, MMNDEL
68 DS(320, "Delete <message-list>") },
69 { "dp", deltype, (A | W | MSGLIST), 0, MMNDEL
70 DS(323, "Delete the current message, then print the next") },
71 { "dt", deltype, (A | W | MSGLIST), 0, MMNDEL
72 DS(323, "Delete the current message, then print the next") },
73 { "undelete", undeletecmd, (A | P | MSGLIST), MDELETED,MMNDEL
74 DS(392, "Un\"delete\" <message-list>") },
75 { "unset", unset, (M | RAWLIST), 1, 1000
76 DS(402, "Unset <option-list>") },
77 { "mail", csendmail, (R | M | I | STRLIST), 0, 0
78 DS(351, "Compose mail; recipients may be given as arguments") },
79 { "Mail", cSendmail, (R | M | I | STRLIST), 0, 0
80 DS(350, "Like \"mail\", but derive filename from first recipient") },
81 { "mbox", mboxit, (A | W | MSGLIST), 0, 0
82 DS(352, "Indicate that <message-list> is to be stored in *mbox*") },
83 { "more", more, (A | MSGLIST), 0, MMNDEL
84 DS(410, "Like \"type\"/\"print\", put print \\f between messages") },
85 { "page", more, (A | MSGLIST), 0, MMNDEL
86 DS(410, "Like \"type\"/\"print\", put print \\f between messages") },
87 { "More", More, (A | MSGLIST), 0, MMNDEL
88 DS(411, "Like \"Type\"/\"Print\", put print \\f between messages") },
89 { "Page", More, (A | MSGLIST), 0, MMNDEL
90 DS(411, "Like \"Type\"/\"Print\", put print \\f between messages") },
91 { "unread", unread, (A | MSGLIST), 0, MMNDEL
92 DS(356, "Mark <message-list> as not being read") },
93 { "Unread", unread, (A | MSGLIST), 0, MMNDEL
94 DS(356, "Mark <message-list> as not being read") },
95 { "new", unread, (A | MSGLIST), 0, MMNDEL
96 DS(356, "Mark <message-list> as not being read") },
97 { "New", unread, (A | MSGLIST), 0, MMNDEL
98 DS(356, "Mark <message-list> as not being read") },
99 { "!", shell, (I | STRLIST), 0, 0
100 DS(412, "Execute <shell-command>") },
101 { "copy", copycmd, (A | M | STRLIST), 0, 0
102 DS(314, "Copy <message-list>, but don't mark them for deletion") },
103 { "Copy", Copycmd, (A | M | STRLIST), 0, 0
104 DS(315, "Like \"copy\", but derive filename from first sender") },
105 { "chdir", c_chdir, (M | RAWLIST), 0, 1
106 DS(309, "Change CWD to the specified/the login directory") },
107 { "cd", c_chdir, (M | RAWLIST), 0, 1
108 DS(309, "Change CWD to the specified/the login directory") },
109 { "save", save, (A | STRLIST), 0, 0
110 DS(371, "Append <message-list> to <file>") },
111 { "Save", Save, (A | STRLIST), 0, 0
112 DS(372, "Like \"save\", but derive filename from first sender") },
113 { "source", csource, (M | RAWLIST), 1, 1
114 DS(383, "Read commands from <file>") },
115 { "set", set, (M | RAWLIST), 0, 1000
116 DS(376, "Print all variables, or set variables to argument(s)") },
117 { "shell", dosh, (I | NOLIST), 0, 0
118 DS(378, "Invoke an interactive shell") },
119 { "unalias", ungroup, (M | RAWLIST), 0, 1000
120 DS(387, "Un\"alias\" <name-list>") },
121 { "write", cwrite, (A | STRLIST), 0, 0
122 DS(406, "Write (append) to <file>") },
123 { "from", from, (A | MSGLIST), 0, MMNORM
124 DS(338, "Show message headers of <message-list>") },
125 { "file", cfile, (T | M | RAWLIST), 0, 1
126 DS(329, "Switch to new or show the current mail file or folder") },
127 { "followup", followup, (A | R | I | MSGLIST), 0, MMNDEL
128 DS(333, "Like \"respond\", but derive filename from first sender") },
129 { "followupall", followupall, (A | R | I | MSGLIST), 0, MMNDEL
130 DS(334, "Like \"respond\", but derive filename from first sender") },
131 { "followupsender", followupsender, (A | R | I | MSGLIST), 0, MMNDEL
132 DS(335, "Like \"Followup\", but always respond to the sender only") },
133 { "folder", cfile, (T | M | RAWLIST), 0, 1
134 DS(329, "Switch to new or show the current mail file or folder") },
135 { "folders", folders, (T | M | RAWLIST), 0, 1
136 DS(332, "List folders (below given folder)") },
137 { "z", scroll, (A | M | STRLIST), 0, 0
138 DS(407, "Scroll to next/previous window of headers") },
139 { "Z", Scroll, (A | M | STRLIST), 0, 0
140 DS(408, "Like \"z\", but continues to the next flagged message") },
141 { "headers", headers, (A | MSGLIST), 0, MMNDEL
142 DS(342, "Show the current(/last/next) 18-message group of headers") },
143 { "help", help, (M | RAWLIST), 0, 1
144 DS(343, "Show command help (for the given one)") },
145 { "?", help, (M | RAWLIST), 0, 1
146 DS(343, "Show command help (for the given one)") },
147 { "=", pdot, (A | NOLIST), 0, 0
148 DS(409, "Show current message number") },
149 { "Reply", Respond, (A | R | I | MSGLIST), 0, MMNDEL
150 DS(368, "Reply to originator, exclusively") },
151 { "Respond", Respond, (A | R | I | MSGLIST), 0, MMNDEL
152 DS(368, "Reply to originator, exclusively") },
153 { "Followup", Followup, (A | R | I | MSGLIST), 0, MMNDEL
154 DS(332, "Like \"Respond\", but derive filename from first sender") },
155 { "reply", respond, (A | R | I | MSGLIST), 0, MMNDEL
156 DS(369, "Reply to originator and recipients of <message-list>") },
157 { "replyall", respondall, (A | R | I | MSGLIST), 0, MMNDEL
158 DS(369, "Reply to originator and recipients of <message-list>") },
159 { "replysender", respondsender, (A | R | I | MSGLIST), 0, MMNDEL
160 DS(368, "Reply to originator, exclusively") },
161 { "respond", respond, (A | R | I | MSGLIST), 0, MMNDEL
162 DS(369, "Reply to originators and recipients of <message-list>") },
163 { "respondall", respondall, (A | R | I | MSGLIST), 0, MMNDEL
164 DS(369, "Reply to originators and recipients of <message-list>") },
165 { "respondsender", respondsender, (A | R | I | MSGLIST),0, MMNDEL
166 DS(368, "Reply to originator, exclusively") },
167 { "Resend", Resendcmd, (A | R | STRLIST), 0, MMNDEL
168 DS(365, "Like \"resend\", but don't add Resent-* headers") },
169 { "Redirect", Resendcmd, (A | R | STRLIST), 0, MMNDEL
170 DS(365, "Like \"resend\", but don't add Resent-* headers") },
171 { "resend", resendcmd, (A | R | STRLIST), 0, MMNDEL
172 DS(364, "Resend <message-list> to <user>, add Resent-* headers") },
173 { "redirect", resendcmd, (A | R | STRLIST), 0, MMNDEL
174 DS(364, "Resend <message-list> to <user>, add Resent-* headers") },
175 { "Forward", Forwardcmd, (A | R | STRLIST), 0, MMNDEL
176 DS(337, "Like \"forward\", but derive filename from <address>") },
177 { "Fwd", Forwardcmd, (A | R | STRLIST), 0, MMNDEL
178 DS(337, "Like \"forward\", but derive filename from <address>") },
179 { "forward", forwardcmd, (A | R | STRLIST), 0, MMNDEL
180 DS(336, "Forward <message> to <address>") },
181 { "fwd", forwardcmd, (A | R | STRLIST), 0, MMNDEL
182 DS(336, "Forward <message> to <address>") },
183 { "edit", editor, (A | I | MSGLIST), 0, MMNORM
184 DS(326, "Edit <message-list>") },
185 { "echo", echo, (M | ECHOLIST), 0, 1000
186 DS(325, "Echo given arguments") },
187 { "quit", quitcmd, NOLIST, 0, 0
188 DS(363, "Terminate session, saving messages as necessary") },
189 { "list", &_pcmdlist, (M | NOLIST), 0, 0
190 DS(349, "List all available commands") },
191 { "xit", rexit, (M | NOLIST), 0, 0
192 DS(328, "Immediate return to the shell without saving") },
193 { "exit", rexit, (M | NOLIST), 0, 0
194 DS(328, "Immediate return to the shell without saving") },
195 { "pipe", pipecmd, (A | STRLIST), 0, MMNDEL
196 DS(359, "Pipe <message-list> to <command>") },
197 { "|", pipecmd, (A | STRLIST), 0, MMNDEL
198 DS(359, "Pipe <message-list> to <command>") },
199 { "Pipe", Pipecmd, (A | STRLIST), 0, MMNDEL
200 DS(358, "Like \"pipe\", but pipes all headers and parts") },
201 { "size", messize, (A | MSGLIST), 0, MMNDEL
202 DS(381, "Show size in characters for <message-list>") },
203 { "hold", preserve, (A | W | MSGLIST), 0, MMNDEL
204 DS(344, "Save <message-list> in system mailbox instead of *mbox*") },
205 { "if", &c_if, (F | M | RAWLIST), 1, 3
206 DS(327, "Part of the if .. then .. endif statement") },
207 { "else", &c_else, (F | M | RAWLIST), 0, 0
208 DS(327, "Part of the if .. then .. endif statement") },
209 { "endif", &c_endif, (F | M | RAWLIST), 0, 0
210 DS(327, "Part of the if .. then .. endif statement") },
211 { "alternates", alternates, (M | RAWLIST), 0, 1000
212 DS(305, "Show or define an alternate list for the invoking user") },
213 { "ignore", igfield, (M | RAWLIST), 0, 1000
214 DS(321, "Add header fields to ignored LIST), or show that list") },
215 { "discard", igfield, (M | RAWLIST), 0, 1000
216 DS(321, "Add header fields to ignored LIST), or show that list") },
217 { "retain", retfield, (M | RAWLIST), 0, 1000
218 DS(370, "Add header fields to retained LIST), or show that list") },
219 { "saveignore", saveigfield, (M | RAWLIST), 0, 1000
220 DS(373, "Is to \"save\" what \"ignore\" is to \"type\"/\"print\"") },
221 { "savediscard",saveigfield, (M | RAWLIST), 0, 1000
222 DS(373, "Is to \"save\" what \"ignore\" is to \"type\"/\"print\"") },
223 { "saveretain", saveretfield, (M | RAWLIST), 0, 1000
224 DS(374, "Is to \"save\" what \"retain\" is to \"type\"/\"print\"") },
225 { "unignore", unignore, (M | RAWLIST), 0, 1000
226 DS(396, "Un\"ignore\" <header-fields>") },
227 { "unretain", unretain, (M | RAWLIST), 0, 1000
228 DS(399, "Un\"retain\" <header-fields>") },
229 { "unsaveignore", unsaveignore, (M | RAWLIST), 0, 1000
230 DS(400, "Un\"saveignore\" <header-fields>") },
231 { "unsaveretain", unsaveretain, (M | RAWLIST), 0, 1000
232 DS(401, "Un\"saveretain\" <header-fields>") },
233 { "inc", newmail, (A | T | NOLIST), 0, 0
234 DS(346, "Check for new mail in current folder") },
235 { "newmail", newmail, (A | T | NOLIST), 0, 0
236 DS(346, "Check for new mail in current folder") },
237 { "shortcut", shortcut, (M | RAWLIST), 0, 1000
238 DS(379, "Define a <shortcut> and <expansion>, or list shortcuts") },
239 { "unshortcut", unshortcut, (M | RAWLIST), 0, 1000
240 DS(403, "Delete <shortcut-list>") },
241 { "imap", imap_imap, (A | STRLIST), 0, 1000
242 DS(345, "Send command strings directly to the IMAP server") },
243 { "account", c_account, (M | RAWLIST), 0, 1000
244 DS(303, "Creates, selects or lists an email account") },
245 { "thread", thread, (A | MSGLIST), 0, 0
246 DS(384, "Create threaded view of current \"folder\"") },
247 { "unthread", unthread, (A | MSGLIST), 0, 0
248 DS(404, "Disable sorted or threaded mode") },
249 { "online", cconnect, (A | NOLIST), 0, 0
250 DS(314, "If disconnected, connect to IMAP mailbox") },
251 { "connect", cconnect, (A | NOLIST), 0, 0
252 DS(314, "If disconnected, connect to IMAP mailbox") },
253 { "disconnect", cdisconnect, (A | NDMLIST), 0, 0
254 DS(322, "If connected, disconnect from IMAP mailbox") },
255 { "sort", sort, (A | RAWLIST), 0, 1
256 DS(382, "Change sorting criteria (and addressing modes)") },
257 { "unsort", unthread, (A | MSGLIST), 0, 0
258 DS(404, "Disable sorted or threaded mode") },
259 { "cache", ccache, (A | MSGLIST), 0, 0
260 DS(307, "Read specified <message list> into the IMAP cache") },
261 { "flag", cflag, (A | M | MSGLIST), 0, 0
262 DS(330, "(Un)Flag <message-list> (for special attention)") },
263 { "unflag", cunflag, (A | M | MSGLIST), 0, 0
264 DS(330, "(Un)Flag <message-list> (for special attention)") },
265 { "answered", canswered, (A | M | MSGLIST), 0, 0
266 DS(306, "Mark the given <message list> as \"answered\"") },
267 { "unanswered", cunanswered, (A | M | MSGLIST), 0, 0
268 DS(388, "Un\"answered\" <message-list>") },
269 { "draft", cdraft, (A | M | MSGLIST), 0, 0
270 DS(324, "Mark <message-list> as draft") },
271 { "undraft", cundraft, (A | M | MSGLIST), 0, 0
272 DS(389, "Un\"draft\" <message-list>") },
273 { "define", &c_define, (M | RAWLIST), 0, 2
274 DS(319, "Define a macro") },
275 { "defines", &c_defines, (M | RAWLIST), 0, 0
276 DS(320, "Show all defined macros including their content") },
277 { "undef", &c_undef, (M | RAWLIST), 0, 1000
278 DS(391, "Un\"define\" all <macros>") },
279 { "call", &c_call, (M | RAWLIST), 0, 1
280 DS(308, "Call a macro") },
281 { "~", &c_call, (M | RAWLIST), 0, 1
282 DS(308, "Call a macro") },
283 { "move", cmove, (A | M | STRLIST), 0, 0
284 DS(353, "Like \"copy\", but mark messages for deletion") },
285 { "mv", cmove, (A | M | STRLIST), 0, 0
286 DS(353, "Like \"copy\", but mark messages for deletion") },
287 { "Move", cMove, (A | M | STRLIST), 0, 0
288 DS(354, "Like \"move\", but derive filename from first sender") },
289 { "Mv", cMove, (A | M | STRLIST), 0, 0
290 DS(354, "Like \"move\", but derive filename from first sender") },
291 { "noop", cnoop, (A | M | RAWLIST), 0, 0
292 DS(357, "NOOP command if IMAP or POP folder; else noop") },
293 { "collapse", ccollapse, (A | MSGLIST), 0, 0
294 DS(312, "Collapse thread views for <message-list>") },
295 { "uncollapse", cuncollapse, (A | MSGLIST), 0, 0
296 DS(390, "Uncollapse <message-list> if in threaded view") },
297 { "verify", cverify, (A | MSGLIST), 0, 0
298 DS(405, "Verify <message-list>") },
299 { "decrypt", cdecrypt, (A | M | STRLIST), 0, 0
300 DS(316, "Like \"copy\", but decrypt first, if encrypted") },
301 { "Decrypt", cDecrypt, (A | M | STRLIST), 0, 0
302 DS(317, "Like \"decrypt\", but derive filename from first sender") },
303 { "certsave", ccertsave, (A | STRLIST), 0, 0
304 DS(310, "Save S/MIME certificates of <message-list> to <file>") },
305 { "rename", crename, (M | RAWLIST), 0, 2
306 DS(367, "Rename <existing-folder> to <new-folder>") },
307 { "remove", cremove, (M | RAWLIST), 0, 1000
308 DS(366, "Remove the named folders") },
309 { "show", show, (A | MSGLIST), 0, MMNDEL
310 DS(380, "Like \"print\", but show raw message content") },
311 { "Show", show, (A | MSGLIST), 0, MMNDEL
312 DS(380, "Like \"print\", but show raw message content") },
313 { "seen", seen, (A | M | MSGLIST), 0, MMNDEL
314 DS(377, "Mark <message-list> as seen") },
315 { "Seen", seen, (A | M | MSGLIST), 0, MMNDEL
316 DS(377, "Mark <message-list> as seen") },
317 { "fwdignore", fwdigfield, (M | RAWLIST), 0, 1000
318 DS(339, "Which header fields are to be ignored with \"forward\"") },
319 { "fwddiscard", fwdigfield, (M | RAWLIST), 0, 1000
320 DS(339, "Which header fields are to be ignored with \"forward\"") },
321 { "fwdretain", fwdretfield, (M | RAWLIST), 0, 1000
322 DS(340, "Which header fields have to be retained with \"forward\"") },
323 { "unfwdignore", unfwdignore, (M | RAWLIST), 0, 1000
324 DS(393, "Un\"fwdignore\" <header-fields>") },
325 { "unfwdretain", unfwdretain, (M | RAWLIST), 0, 1000
326 DS(394, "Un\"fwdretain\" <header-fields>") },
327 { "mimetypes", &c_mimetypes, (M | RAWLIST), 0, 1000
328 DS(418, "Either <show> (default) or <clear> the mime.types cache") },
329 { "spamrate", cspam_rate, (A | M | R | MSGLIST), 0, 0
330 DS(419, "Rate <message-list> via the spam detector") },
331 { "spamham", cspam_ham, (A | M | R | MSGLIST), 0, 0
332 DS(420, "Teach the spam detector that <message-list> is ham") },
333 { "spamspam", cspam_spam, (A | M | R | MSGLIST), 0, 0
334 DS(421, "Teach the spam detector that <message-list> is spam") },
335 { "spamforget", cspam_forget, (A | M | R | MSGLIST), 0, 0
336 DS(422, "Force the spam detector to \"unlearn\" <message-list>") },
337 { "spamset", cspam_set, (A | M | MSGLIST), 0, 0
338 DS(423, "Set the spam flag for each message in <message-list>") },
339 { "spamclear", cspam_clear, (A | M | MSGLIST), 0, 0
340 DS(424, "Clear the spam flag for each message in <message-list>") },
341 { "ghost", &_ghost, (M | RAWLIST), 0, 2
342 DS(425, "Define a <ghost> of <command>, or list all ghosts") },
343 { "unghost", &_unghost, (M | RAWLIST), 1, 1000
344 DS(426, "Delete <ghost-list>") },
345 { "localopts", &c_localopts, (M | RAWLIST), 1, 1
346 DS(427, "Inside `define' / `account': insulate modifications? <0> / <1>")},
347 { "cwd", &c_cwd, (M | NOLIST), 0, 0
348 DS(428, "Print current working directory (CWD)") },
349 { "pwd", &c_cwd, (M | NOLIST), 0, 0
350 DS(428, "Print current working directory (CWD)") },
351 { "var-inspect", &c_var_inspect, (M | RAWLIST), 1, 1000
352 DS(430, "Print some informations on the given <variables>") },
353 { "features", &_features, (M | NOLIST), 0, 0
354 DS(429, "Show features that are compiled into the MUA") },
355 { "version", &_version, (M | NOLIST), 0, 0
356 DS(413, "Print the MUA version") },
357 #if defined HAVE_HISTORY &&\
358 (defined HAVE_READLINE || defined HAVE_EDITLINE || defined HAVE_NCL)
359 { "history", &c_history, (M | RAWLIST), 0, 1
360 DS(431, "Either <show> (default) or <clear> the line editor history") },
361 #endif
362 #ifdef HAVE_DEBUG
363 { "sstats", &c_sstats, (M | NOLIST), 0, 0
364 DS(416, "Print statistics about the auto-reclaimed string store") },
365 { "smemtrace", smemtrace, (M | NOLIST), 0, 0
366 DS(417, "Trace current memory usage afap") },
367 #endif
368 { NULL, NULL, 0, 0, 0 DS(0, "") }
370 /* vim:set fenc=utf-8:s-it-mode */