1 /***********************************************************************
3 * This software is part of the ast package *
4 * Copyright (c) 1982-2010 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Common Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
9 * A copy of the License is available at *
10 * http://www.opensource.org/licenses/cpl1.0.txt *
11 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
13 * Information and Software Systems Research *
17 * David Korn <dgk@research.att.com> *
19 ***********************************************************************/
27 # define bashopt(a,b) a, b|SH_BASHOPT,
28 # define bashextra(a,b) a, b|SH_BASHEXTRA,
31 # define bashextra(a,b)
35 * This is the list of invocation and set options
36 * This list must be in in ascii sorted order
39 const Shtable_t shtab_options
[] =
41 "allexport", SH_ALLEXPORT
,
43 "bash", (SH_BASH
|SH_COMMANDLINE
),
46 "braceexpand", SH_BRACEEXPAND
,
47 bashopt("cdable_vars", SH_CDABLE_VARS
)
48 bashopt("cdspell", SH_CDSPELL
)
49 bashopt("checkhash", SH_CHECKHASH
)
50 bashopt("checkwinsize", SH_CHECKWINSIZE
)
51 "noclobber", SH_NOCLOBBER
,
52 bashopt("dotglob", SH_DOTGLOB
)
54 "errexit", SH_ERREXIT
,
56 bashopt("execfail", SH_EXECFAIL
)
57 bashopt("expand_aliases", SH_EXPAND_ALIASES
)
58 bashopt("extglob", SH_EXTGLOB
)
60 "globstar", SH_GLOBSTARS
,
62 bashextra("hashall", SH_TRACKALL
)
63 bashopt("histappend", SH_HISTAPPEND
)
65 "histexpand", SH_HISTEXPAND
,
67 bashextra("histexpand", SH_HISTEXPAND
)
69 bashextra("history", SH_HISTORY2
)
70 bashopt("histreedit", SH_HISTREEDIT
)
71 bashopt("histverify", SH_HISTVERIFY
)
72 bashopt("hostcomplete", SH_HOSTCOMPLETE
)
73 bashopt("huponexit", SH_HUPONEXIT
)
74 "ignoreeof", SH_IGNOREEOF
,
75 "interactive", SH_INTERACTIVE
|SH_COMMANDLINE
,
76 bashextra("interactive_comments", SH_INTERACTIVE_COMM
)
77 "keyword", SH_KEYWORD
,
78 bashopt("lithist", SH_LITHIST
)
80 "login_shell", SH_LOGIN_SHELL
|SH_COMMANDLINE
,
81 bashopt("mailwarn", SH_MAILWARN
)
82 "markdirs", SH_MARKDIRS
,
83 "monitor", SH_MONITOR
,
84 "multiline", SH_MULTILINE
,
85 bashopt("no_empty_cmd_completion", SH_NOEMPTYCMDCOMPL
)
86 bashopt("nocaseglob", SH_NOCASEGLOB
)
88 bashopt("nullglob", SH_NULLGLOB
)
89 bashextra("onecmd", SH_TFLAG
)
90 "pipefail", SH_PIPEFAIL
,
91 bashextra("physical", SH_PHYSICAL
)
92 bashextra("posix", SH_POSIX
)
93 "privileged", SH_PRIVILEGED
,
95 "profile", SH_LOGIN_SHELL
|SH_COMMANDLINE
,
97 "pfsh", SH_PFSH
|SH_COMMANDLINE
,
101 "profile", SH_PFSH
|SH_COMMANDLINE
,
104 bashopt("progcomp", SH_PROGCOMP
)
105 bashopt("promptvars", SH_PROMPTVARS
)
106 "rc", SH_RC
|SH_COMMANDLINE
,
107 "restricted", SH_RESTRICTED
,
108 bashopt("restricted_shell", SH_RESTRICTED2
|SH_COMMANDLINE
)
109 bashopt("shift_verbose", SH_SHIFT_VERBOSE
)
111 bashopt("sourcepath", SH_SOURCEPATH
)
112 "trackall", SH_TRACKALL
,
113 "nounset", SH_NOUNSET
,
114 "verbose", SH_VERBOSE
,
117 bashopt("xpg_echo", SH_XPG_ECHO
)
122 const Shtable_t shtab_attributes
[] =
124 {"-Sshared", NV_REF
|NV_TAGGED
},
125 {"-nnameref", NV_REF
},
126 {"-xexport", NV_EXPORT
},
127 {"-rreadonly", NV_RDONLY
},
128 {"-ttagged", NV_TAGGED
},
129 {"-Aassociative array", NV_ARRAY
},
130 {"-aindexed array", NV_ARRAY
},
131 {"-llong", (NV_DOUBLE
|NV_LONG
)},
132 {"-Eexponential",(NV_DOUBLE
|NV_EXPNOTE
)},
133 {"-Xhexfloat", (NV_DOUBLE
|NV_HEXFLOAT
)},
134 {"-Ffloat", NV_DOUBLE
},
135 {"-llong", (NV_INTEGER
|NV_LONG
)},
136 {"-sshort", (NV_INTEGER
|NV_SHORT
)},
137 {"-uunsigned", (NV_INTEGER
|NV_UNSIGN
)},
138 {"-iinteger", NV_INTEGER
},
139 {"-Hfilename", NV_HOST
},
140 {"-bbinary", NV_BINARY
},
141 {"-llowercase", NV_UTOL
},
142 {"-Zzerofill", NV_ZFILL
},
143 {"-Lleftjust", NV_LJUST
},
144 {"-Rrightjust", NV_RJUST
},
145 {"-uuppercase", NV_LTOU
},
146 {"++namespace", NV_TABLE
},