mksh | 0 true is not special; prefix assignments don't persist, it can be redefined
stdout:
foo=
true func
foo=bar
stderr:
|
zsh | 1 Prefix assignments persist after special builtins, like : (set -o posix)
stdout:
foo=
z=
stderr:
|
bash | 2 Prefix assignments persist after readonly, but NOT exported (set -o posix)
stdout:
foo=bar
spam=eggs
bar
None
stderr:
|
yash | 2 Prefix assignments persist after readonly, but NOT exported (set -o posix)
stdout:
foo=bar
spam=eggs
bar
None
stderr:
|
yash | 3 Prefix binding for exec is a special case (versus e.g. readonly)
stdout:
pre1=pre1 x= pre2=pre2
stderr:
|
dash | 4 exec without args is a special case of the special case in some shells
stdout:
stderr:
FOO=bar
|
mksh | 4 exec without args is a special case of the special case in some shells
stdout:
stderr:
FOO=bar
|
ash | 4 exec without args is a special case of the special case in some shells
stdout:
stderr:
FOO=bar
|
yash | 4 exec without args is a special case of the special case in some shells
stdout:
stderr:
FOO=bar
|
bash | 5 Which shells allow special builtins to be redefined?
stdout:
eval func echo hi
stderr:
|
dash | 5 Which shells allow special builtins to be redefined?
stdout:
stderr:
dash: 1: Syntax error: Bad function name
|
zsh | 5 Which shells allow special builtins to be redefined?
stdout:
eval func echo hi
stderr:
|
ash | 5 Which shells allow special builtins to be redefined?
stdout:
stderr:
ash: syntax error: bad function name
|
bash | 6 Special builtins can't be redefined as shell functions (set -o posix)
stdout:
hi
stderr:
bash: line 9: `eval': is a special builtin
|
dash | 6 Special builtins can't be redefined as shell functions (set -o posix)
stdout:
hi
stderr:
dash: 7: Syntax error: Bad function name
|
zsh | 6 Special builtins can't be redefined as shell functions (set -o posix)
stdout:
hi
sh func echo hi
stderr:
|
ash | 6 Special builtins can't be redefined as shell functions (set -o posix)
stdout:
hi
stderr:
ash: syntax error: bad function name
|
bash | 8 Shift is special and fails whole script
stdout:
status=1
stderr:
bash: line 6: shift: 3: shift count out of range
|
zsh | 8 Shift is special and fails whole script
stdout:
status=1
stderr:
zsh:shift:6: shift count must be <= $#
|
ash | 8 Shift is special and fails whole script
stdout:
status=1
stderr:
|
yash | 8 Shift is special and fails whole script
stdout:
status=1
stderr:
shift: 3: cannot shift so many (there are only 2 positional parameters)
|
osh | 8 Shift is special and fails whole script
stdout:
status=1
stderr:
|
bash | 9 set is special and fails whole script, even if using || true
stdout:
ok
should not get here
stderr:
bash: line 6: shopt: invalid_: invalid shell option name
bash: line 8: set: invalid_: invalid option name
|
ash | 9 set is special and fails whole script, even if using || true
stdout:
ok
should not get here
stderr:
ash: shopt: not found
ash: set: line 7: illegal option -o invalid_
|
yash | 9 set is special and fails whole script, even if using || true
stdout:
ok
should not get here
stderr:
yash: no such command `shopt'
set: `invalid_' is not a valid option
|
osh | 9 set is special and fails whole script, even if using || true
stdout:
ok
should not get here
stderr:
shopt -s invalid_ || true
^~~~~
[ -c flag ]:6: 'shopt' got invalid option 'invalid_'
set -o invalid_ || true
^~~
[ -c flag ]:8: 'set' got invalid option 'invalid_'
|
bash | 10 bash 'type' gets confused - says 'function', but runs builtin
stdout:
TRUE
builtin
function
---
EVAL
builtin
shell function: echo before posix
after posix
function
stderr:
|
dash | 10 bash 'type' gets confused - says 'function', but runs builtin
stdout:
stderr:
|
mksh | 10 bash 'type' gets confused - says 'function', but runs builtin
stdout:
stderr:
|
zsh | 10 bash 'type' gets confused - says 'function', but runs builtin
stdout:
stderr:
|
ash | 10 bash 'type' gets confused - says 'function', but runs builtin
stdout:
stderr:
|
yash | 10 bash 'type' gets confused - says 'function', but runs builtin
stdout:
stderr:
|
dash | 11 command, builtin - both can be redefined, not special (regression)
stdout:
stderr:
|
ash | 11 command, builtin - both can be redefined, not special (regression)
stdout:
stderr:
|
yash | 11 command, builtin - both can be redefined, not special (regression)
stdout:
stderr:
|