1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/src/cmd/ksh93/sh
Johnothan King 5461f11968
Fix handling of '--posix' and '--default' (#265)
src/cmd/ksh93/sh/args.c: sh_argopts():
- Remove special-casing for --posix (see also data/builtins.c) and
  move the case -5: to the case ':' instead, so this option is
  handled like all other long options. This change fixes two bugs:
  1. 'set --posix' had no effect on the letoctal or braceexpand
     options. Reproducer:
       $ set --posix
       $ [[ -o braceexpand ]]; echo $?
       0
       $ [[ -o letoctal ]]; echo $?
       1
  2. 'ksh --posix' could not run scripts correctly because it
     wrongly enabled '-c'. Reproducer:
       $ ksh --posix < <(echo 'exit 0')
       ksh: -c requires argument
       Usage: ksh [--posix] [arg ...]
       Help: ksh [ --help | --man ] 2>&1
- Don't allow 'set --default' to unset the restricted option.

src/cmd/ksh93/tests/options.sh:
- Add regression tests for the bugs described above, using -o posix
  and --posix.

src/cmd/ksh93/tests/restricted.sh:
- Add a regression test for 'set --default' in rksh.

Co-authored-by: Martijn Dekker <martijn@inlv.org>
2021-04-09 23:26:07 +01:00
..
args.c Fix handling of '--posix' and '--default' (#265) 2021-04-09 23:26:07 +01:00
arith.c Introduce usage of __builtin_unreachable() and noreturn (#248) 2021-04-05 00:28:24 +01:00
array.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
defs.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
deparse.c Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
expand.c Add --globcasedetect shell option for globbing and completion 2021-03-22 18:45:19 +00:00
fault.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
fcin.c Fix many GCC -Wimplicit-fallthrough warnings (#243) 2021-03-30 21:49:20 +01:00
init.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
io.c Backport bugfix for BUG_CSUBSTDO from ksh93v- 2012-08-24 (#259) 2021-04-08 13:24:17 +01:00
jobs.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
lex.c lex.c: simplify fmttoken() by using the stack (re: 3255aed2) 2021-04-09 17:36:29 +01:00
macro.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
main.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
name.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
nvdisc.c Introduce usage of __builtin_unreachable() and noreturn (#248) 2021-04-05 00:28:24 +01:00
nvtree.c Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
nvtype.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
parse.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
path.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
pmain.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
shcomp.c Introduce usage of __builtin_unreachable() and noreturn (#248) 2021-04-05 00:28:24 +01:00
streval.c Hardening of readonly variables (#239) 2021-04-05 06:43:19 +01:00
string.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
subshell.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
suid_exec.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
tdump.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
timers.c Introduce usage of __builtin_unreachable() and noreturn (#248) 2021-04-05 00:28:24 +01:00
trestore.c '#if 0' cleanup 2020-08-30 04:51:20 +01:00
waitevent.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
xec.c Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00