• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #if defined(SHFLAGS_DEFNS)
2 __RCSID("$MirOS: src/bin/mksh/sh_flags.h,v 1.9 2011/06/12 15:37:10 tg Exp $");
3 #define FN(sname,cname,ochar,flags)	/* nothing */
4 #elif defined(SHFLAGS_ENUMS)
5 #define FN(sname,cname,ochar,flags)	cname,
6 #define F0(sname,cname,ochar,flags)	cname = 0,
7 #elif defined(SHFLAGS_ITEMS)
8 #define FN(sname,cname,ochar,flags)	{ sname, ochar, flags },
9 #endif
10 
11 #ifndef F0
12 #define F0 FN
13 #endif
14 
15 /*
16  * special cases (see parse_args()): -A, -o, -s
17  *
18  * options are sorted by their longnames
19  */
20 
21 /* -a	all new parameters are created with the export attribute */
22 F0("allexport", FEXPORT, 'a', OF_ANY)
23 
24 #if HAVE_NICE
25 /* ./.	bgnice */
26 FN("bgnice", FBGNICE, 0, OF_ANY)
27 #endif
28 
29 /* ./.	enable {} globbing (non-standard) */
30 FN("braceexpand", FBRACEEXPAND, 0, OF_ANY)
31 
32 /* ./.	Emacs command line editing mode */
33 FN("emacs", FEMACS, 0, OF_ANY)
34 
35 /* -e	quit on error */
36 FN("errexit", FERREXIT, 'e', OF_ANY)
37 
38 /* ./.	Emacs command line editing mode, gmacs variant */
39 FN("gmacs", FGMACS, 0, OF_ANY)
40 
41 /* ./.	reading EOF does not exit */
42 FN("ignoreeof", FIGNOREEOF, 0, OF_ANY)
43 
44 /* -i	interactive shell */
45 FN("interactive", FTALKING, 'i', OF_CMDLINE)
46 
47 /* -k	name=value are recognised anywhere */
48 FN("keyword", FKEYWORD, 'k', OF_ANY)
49 
50 /* -l	login shell */
51 FN("login", FLOGIN, 'l', OF_CMDLINE)
52 
53 /* -X	mark dirs with / in file name completion */
54 FN("markdirs", FMARKDIRS, 'X', OF_ANY)
55 
56 #ifndef MKSH_UNEMPLOYED
57 /* -m	job control monitoring */
58 FN("monitor", FMONITOR, 'm', OF_ANY)
59 #endif
60 
61 /* -C	don't overwrite existing files */
62 FN("noclobber", FNOCLOBBER, 'C', OF_ANY)
63 
64 /* -n	don't execute any commands */
65 FN("noexec", FNOEXEC, 'n', OF_ANY)
66 
67 /* -f	don't do file globbing */
68 FN("noglob", FNOGLOB, 'f', OF_ANY)
69 
70 /* ./.	don't kill running jobs when login shell exits */
71 FN("nohup", FNOHUP, 0, OF_ANY)
72 
73 /* ./.	don't save functions in history (no effect) */
74 FN("nolog", FNOLOG, 0, OF_ANY)
75 
76 #ifndef MKSH_UNEMPLOYED
77 /* -b	asynchronous job completion notification */
78 FN("notify", FNOTIFY, 'b', OF_ANY)
79 #endif
80 
81 /* -u	using an unset variable is an error */
82 FN("nounset", FNOUNSET, 'u', OF_ANY)
83 
84 /* ./.	don't do logical cds/pwds (non-standard) */
85 FN("physical", FPHYSICAL, 0, OF_ANY)
86 
87 /* ./.	pdksh compat: somewhat more POSIXish mode (non-standard) */
88 FN("posix", FPOSIX, 0, OF_ANY)
89 
90 /* -p	use suid_profile; privileged shell */
91 FN("privileged", FPRIVILEGED, 'p', OF_ANY)
92 
93 /* -r	restricted shell */
94 FN("restricted", FRESTRICTED, 'r', OF_CMDLINE)
95 
96 /* ./.	pdksh compat: called as sh not mksh; kludge mode (non-standard) */
97 FN("sh", FSH, 0, OF_ANY)
98 
99 /* -s	(invocation) parse stdin (pseudo non-standard) */
100 FN("stdin", FSTDIN, 's', OF_CMDLINE)
101 
102 /* -h	create tracked aliases for all commands */
103 FN("trackall", FTRACKALL, 'h', OF_ANY)
104 
105 /* -U	enable UTF-8 processing (non-standard) */
106 FN("utf8-mode", FUNICODE, 'U', OF_ANY)
107 
108 /* -v	echo input */
109 FN("verbose", FVERBOSE, 'v', OF_ANY)
110 
111 #if !MKSH_S_NOVI
112 /* ./.	Vi command line editing mode */
113 FN("vi", FVI, 0, OF_ANY)
114 
115 /* ./.	enable ESC as file name completion character (non-standard) */
116 FN("vi-esccomplete", FVIESCCOMPLETE, 0, OF_ANY)
117 
118 /* ./.	enable Tab as file name completion character (non-standard) */
119 FN("vi-tabcomplete", FVITABCOMPLETE, 0, OF_ANY)
120 
121 /* ./.	always read in raw mode (no effect) */
122 FN("viraw", FVIRAW, 0, OF_ANY)
123 #endif
124 
125 /* -x	execution trace (display commands as they are run) */
126 FN("xtrace", FXTRACE, 'x', OF_ANY)
127 
128 /* -c	(invocation) execute specified command */
129 FN(NULL, FCOMMAND, 'c', OF_CMDLINE)
130 
131 /*
132  * anonymous flags: used internally by shell only (not visible to user)
133  */
134 
135 /* ./.	direct builtin call (divined from argv[0] multi-call binary) */
136 FN(NULL, FAS_BUILTIN, 0, OF_INTERNAL)
137 
138 /* ./.	(internal) initial shell was interactive */
139 FN(NULL, FTALKING_I, 0, OF_INTERNAL)
140 
141 #undef FN
142 #undef F0
143 #undef SHFLAGS_DEFNS
144 #undef SHFLAGS_ENUMS
145 #undef SHFLAGS_ITEMS
146