mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Reproducer: $ (IFS=$'\t\t'; val=$'\tone\t\ttwo\t'; set --posix; \ set -- $val; echo $#; set --noposix; set -- $val; echo $#) 2 4 <== OK $ (IFS=$'\t\t'; val=$'\tone\t\ttwo\t'; set --posix; \ set -- $val; echo $#; set --default; set -- $val; echo $#) 2 2 <== bug The output of the seconnd command line should be like the first. When POSIX mode is turned off using 'set --noposix' (or 'set +o posix'), sh.ifstable is invalidated as it needs to be repopulated on the next field split to restore ksh-specific special handling of a repeated $IFS whitespace character as non-whitespace. However, when 'set --default' is used, this does not happen, which is a bug. src/cmd/ksh93/sh/args.c: sh_argopts(): - While processing --default, when turning off SH_POSIX, call sh_invalidate_ifs() to invalidate sh.ifstable. |
||
|---|---|---|
| .. | ||
| builtin | ||
| INIT | ||
| ksh93 | ||
| Mamfile | ||