1/* $NetBSD: option.list,v 1.10 2022/09/18 06:03:19 kre Exp $ */ 2 3/* 4 * define the shell's settable options 5 * 6 * new options can be defined by adding them here, 7 * but they do nothing until code to implement them 8 * is added (using the "var name" field) 9 */ 10 11/* 12 * format is up to 5 columns... (followed by anything) 13 * end of line comments can be introduced by ' #' (space/tab hash) to eol. 14 * 15 * The columns are: 16 * 1. internal shell "var name" (required) 17 * 2. option long name 18 * if a single char, then no long name, and remaining 19 * columns shift left (this becomes the short name) 20 * 3. option short name (single character name) 21 * if '-' or absent then no short name 22 * if neither long nor short name, line is ignored 23 * 4. option set short name (name of option equiv class) 24 * if '-' or absent then no class 25 * 5. default value of option 26 * if absent, default is 0 27 * only 0 or 1 possible (0==off 1==on) ("on" and "off" can be used) 28 * 29 * Data may be followed by any C preprocessor #if expression (incl the #if..) 30 * (including #ifdef #ifndef) to conditionalise output for that option. 31 * The #if expression continues until \n or next following '#' 32 */ 33 34// the POSIX defined options 35aflag allexport a # export all variables 36eflag errexit e # exit on command error ($? != 0) 37mflag monitor m # enable job control 38Cflag noclobber C # do not overwrite files when using > 39nflag noexec n # do not execue commands 40fflag noglob f # no pathname expansion 41uflag nounset u # expanding unset var is an error 42vflag verbose v # echo commands as read 43xflag xtrace x # trace command execution 44 45// the long name (ignoreeof) is standard, the I flag is not 46Iflag ignoreeof I # do not exit interactive shell on EOF 47 48// defined but not really implemented by the shell (yet) - they do nothing 49bflag notify b # [U] report bg job completion 50nolog nolog # [U] no func definitions in history 51// 'h' is standard, long name (trackall) is not 52hflag trackall h # [U] locate cmds in funcs during defn 53 54// 's' is standard for command line, not as 'set' option, nor 'stdin' name 55sflag stdin s # read from standard input 56// minusc c # command line option only. 57// -- o # handled differently... 58 59// non-standard options -- 'i' is just a state, not an option in standard. 60iflag interactive i # interactive shell 61loginsh login l # a login shell 62cdprint cdprint # always print result of a cd 63usefork fork F # use fork(2) instead of vfork(2) 64pflag nopriv p # preserve privs if set[ug]id 65posix posix # be closer to POSIX compat 66qflag quietprofile q # disable -v/-x in startup files 67fnline1 local_lineno L on # number lines in funcs starting at 1 68promptcmds promptcmds # allow $( ) in PS1 (et al). 69pipefail pipefail # pipe exit status 70Xflag xlock X #ifndef SMALL # sticky stderr for -x (implies -x) 71 72// editline/history related options ("vi" is standard, 'V' and others are not) 73// only one of vi/emacs can be set, hence the "set" definition, value 74// of that can be any char (not used for a different set) 75Vflag vi V V # enable vi style editing 76Eflag emacs E V # enable emacs style editing 77tabcomplete tabcomplete # make <tab> cause filename expansion 78 79// internal debug option (not usually included in the shell) 80debug debug #ifdef DEBUG # enable internal shell debugging 81