diff options
author | Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> | 2019-02-01 22:55:37 +0000 |
---|---|---|
committer | Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> | 2019-02-03 18:22:05 -0600 |
commit | 5b57d28ffb6e1ef86b50f7d05d977826eae89bfe (patch) | |
tree | 154a22fe556b49e6927197336f8bf91b12eacd5e /bin/sh/option.list | |
download | userland-5b57d28ffb6e1ef86b50f7d05d977826eae89bfe.tar.gz userland-5b57d28ffb6e1ef86b50f7d05d977826eae89bfe.tar.bz2 userland-5b57d28ffb6e1ef86b50f7d05d977826eae89bfe.tar.xz userland-5b57d28ffb6e1ef86b50f7d05d977826eae89bfe.zip |
initial population
Diffstat (limited to 'bin/sh/option.list')
-rw-r--r-- | bin/sh/option.list | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/bin/sh/option.list b/bin/sh/option.list new file mode 100644 index 0000000..3be683a --- /dev/null +++ b/bin/sh/option.list @@ -0,0 +1,79 @@ +/* $NetBSD: option.list,v 1.9 2018/11/23 20:40:06 kre Exp $ */ + +/* + * define the shell's settable options + * + * new options can be defined by adding them here, + * but they do nothing until code to implement them + * is added (using the "var name" field) + */ + +/* + * format is up to 5 columns... (followed by anything) + * end of line comments can be introduced by ' #' (space/tab hash) to eol. + * + * The columns are: + * 1. internal shell "var name" (required) + * 2. option long name + * if a single char, then no long name, and remaining + * columns shift left (this becomes the short name) + * 3. option short name (single character name) + * if '-' or absent then no short name + * if neither long nor short name, line is ignored + * 4. option set short name (name of option equiv class) + * if '-' or absent then no class + * 5. default value of option + * if absent, default is 0 + * only 0 or 1 possible (0==off 1==on) ("on" and "off" can be used) + * + * Data may be followed by any C preprocessor #if expression (incl the #if..) + * (including #ifdef #ifndef) to conditionalise output for that option. + * The #if expression continues until \n or next following '#' + */ + +// the POSIX defined options +aflag allexport a # export all variables +eflag errexit e # exit on command error ($? != 0) +mflag monitor m # enable job control +Cflag noclobber C # do not overwrite files when using > +nflag noexec n # do not execue commands +fflag noglob f # no pathname expansion +uflag nounset u # expanding unset var is an error +vflag verbose v # echo commands as read +xflag xtrace x # trace command execution + +// the long name (ignoreeof) is standard, the I flag is not +Iflag ignoreeof I # do not exit interactive shell on EOF + +// defined but not really implemented by the shell (yet) - they do nothing +bflag notify b # [U] report bg job completion +nolog nolog # [U] no func definitions in history +// 'h' is standard, long name (trackall) is not +hflag trackall h # [U] locate cmds in funcs during defn + +// 's' is standard for command line, not as 'set' option, nor 'stdin' name +sflag stdin s # read from standard input +// minusc c # command line option only. +// -- o # handled differently... + +// non-standard options -- 'i' is just a state, not an option in standard. +iflag interactive i # interactive shell +cdprint cdprint # always print result of a cd +usefork fork F # use fork(2) instead of vfork(2) +pflag nopriv p # preserve privs if set[ug]id +posix posix # be closer to POSIX compat +qflag quietprofile q # disable -v/-x in startup files +fnline1 local_lineno L on # number lines in funcs starting at 1 +promptcmds promptcmds # allow $( ) in PS1 (et al). +pipefail pipefail # pipe exit status +Xflag xlock X #ifndef SMALL # sticky stderr for -x (implies -x) + +// editline/history related options ("vi" is standard, 'V' and others are not) +// only one of vi/emacs can be set, hence the "set" definition, value +// of that can be any char (not used for a different set) +Vflag vi V V # enable vi style editing +Eflag emacs E V # enable emacs style editing +tabcomplete tabcomplete # make <tab> cause filename expansion + +// internal debug option (not usually included in the shell) +debug debug #ifdef DEBUG # enable internal shell debugging |