4.4BSD snapshot (revision 8.1)
[unix-history] / usr / src / usr.bin / mail / cmdtab.c
CommitLineData
b059c7be
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
0c5f72fb
KB
3 * All rights reserved.
4 *
f15db449 5 * %sccs.include.redist.c%
b059c7be
DF
6 */
7
acfc7e9b 8#ifndef lint
a0d23834 9static char sccsid[] = "@(#)cmdtab.c 5.12 (Berkeley) %G%";
acfc7e9b 10#endif /* not lint */
1d3a1a2f
KS
11
12#include "def.h"
a0d23834 13#include "extern.h"
1d3a1a2f
KS
14
15/*
16 * Mail -- a mail program
17 *
18 * Define all of the command names and bindings.
19 */
20
1d3a1a2f
KS
21struct cmd cmdtab[] = {
22 "next", next, NDMLIST, 0, MMNDEL,
23 "alias", group, M|RAWLIST, 0, 1000,
24 "print", type, MSGLIST, 0, MMNDEL,
25 "type", type, MSGLIST, 0, MMNDEL,
e6160718
KS
26 "Type", Type, MSGLIST, 0, MMNDEL,
27 "Print", Type, MSGLIST, 0, MMNDEL,
67cb9e50 28 "visual", visual, I|MSGLIST, 0, MMNORM,
1d3a1a2f 29 "top", top, MSGLIST, 0, MMNDEL,
c548598c
KS
30 "touch", stouch, W|MSGLIST, 0, MMNDEL,
31 "preserve", preserve, W|MSGLIST, 0, MMNDEL,
32 "delete", delete, W|P|MSGLIST, 0, MMNDEL,
33 "dp", deltype, W|MSGLIST, 0, MMNDEL,
34 "dt", deltype, W|MSGLIST, 0, MMNDEL,
1d3a1a2f
KS
35 "undelete", undelete, P|MSGLIST, MDELETED,MMNDEL,
36 "unset", unset, M|RAWLIST, 1, 1000,
cbaa6c31 37 "mail", sendmail, R|M|I|STRLIST, 0, 0,
b06be156 38 "mbox", mboxit, W|MSGLIST, 0, 0,
b041ccec
S
39 "more", more, MSGLIST, 0, MMNDEL,
40 "page", more, MSGLIST, 0, MMNDEL,
41 "More", More, MSGLIST, 0, MMNDEL,
42 "Page", More, MSGLIST, 0, MMNDEL,
de7ac1f4 43 "unread", unread, MSGLIST, 0, MMNDEL,
1d3a1a2f 44 "!", shell, I|STRLIST, 0, 0,
0d149b8b 45 "copy", copycmd, M|STRLIST, 0, 0,
23464f86
EW
46 "chdir", schdir, M|RAWLIST, 0, 1,
47 "cd", schdir, M|RAWLIST, 0, 1,
1d3a1a2f 48 "save", save, STRLIST, 0, 0,
23464f86 49 "source", source, M|RAWLIST, 1, 1,
1d3a1a2f
KS
50 "set", set, M|RAWLIST, 0, 1000,
51 "shell", dosh, I|NOLIST, 0, 0,
52 "version", pversion, M|NOLIST, 0, 0,
53 "group", group, M|RAWLIST, 0, 1000,
54 "write", swrite, STRLIST, 0, 0,
55 "from", from, MSGLIST, 0, MMNORM,
1bd5b11d 56 "file", file, T|M|RAWLIST, 0, 1,
176b7b1e 57 "folder", file, T|M|RAWLIST, 0, 1,
23464f86 58 "folders", folders, T|M|NOLIST, 0, 0,
1d3a1a2f
KS
59 "?", help, M|NOLIST, 0, 0,
60 "z", scroll, M|STRLIST, 0, 0,
61 "headers", headers, MSGLIST, 0, MMNDEL,
62 "help", help, M|NOLIST, 0, 0,
63 "=", pdot, NOLIST, 0, 0,
cbaa6c31
KS
64 "Reply", Respond, R|I|MSGLIST, 0, MMNDEL,
65 "Respond", Respond, R|I|MSGLIST, 0, MMNDEL,
66 "reply", respond, R|I|MSGLIST, 0, MMNDEL,
67 "respond", respond, R|I|MSGLIST, 0, MMNDEL,
67cb9e50 68 "edit", editor, I|MSGLIST, 0, MMNORM,
e90df9d9 69 "echo", echo, M|RAWLIST, 0, 1000,
2ee3bce2 70 "quit", quitcmd, NOLIST, 0, 0,
1d3a1a2f 71 "list", pcmdlist, M|NOLIST, 0, 0,
8715a8f1
KS
72 "xit", rexit, M|NOLIST, 0, 0,
73 "exit", rexit, M|NOLIST, 0, 0,
1d3a1a2f 74 "size", messize, MSGLIST, 0, MMNDEL,
c548598c 75 "hold", preserve, W|MSGLIST, 0, MMNDEL,
e90df9d9
KS
76 "if", ifcmd, F|M|RAWLIST, 1, 1,
77 "else", elsecmd, F|M|RAWLIST, 0, 0,
78 "endif", endifcmd, F|M|RAWLIST, 0, 0,
26210b9d 79 "alternates", alternates, M|RAWLIST, 0, 1000,
e6160718
KS
80 "ignore", igfield, M|RAWLIST, 0, 1000,
81 "discard", igfield, M|RAWLIST, 0, 1000,
46053c99 82 "retain", retfield, M|RAWLIST, 0, 1000,
887efe38
EW
83 "saveignore", saveigfield, M|RAWLIST, 0, 1000,
84 "savediscard", saveigfield, M|RAWLIST, 0, 1000,
85 "saveretain", saveretfield, M|RAWLIST, 0, 1000,
de7ac1f4 86/* "Header", Header, STRLIST, 0, 1000, */
1d3a1a2f
KS
87 "core", core, M|NOLIST, 0, 0,
88 "#", null, M|NOLIST, 0, 0,
cafd3e72 89 "clobber", clobber, M|RAWLIST, 0, 1,
1d3a1a2f
KS
90 0, 0, 0, 0, 0
91};