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