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