You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can find similar behavior for eval though I haven't checked the other builtins. In Bash, when one needs to pass an arbitrary value to trap / eval, one needs to specify -- because, for example, command=--help; eval "$command" will not be interpreted as expected.
$ osh -c 'trap "echo hello" INT'
$ osh -c 'trap -- "echo hello" INT' trap -- "echo hello" INT ^[ -c flag ]:1: Invalid signal or hook 'echo hello'
$ osh -c 'eval -- echo hello' -- echo hello ^~[ eval at line 1 of -c flag ]:1: '--' not found
11. BUG:
trap
doesn't ignore--
I can find similar behavior for
eval
though I haven't checked the other builtins. In Bash, when one needs to pass an arbitrary value totrap
/eval
, one needs to specify--
because, for example,command=--help; eval "$command"
will not be interpreted as expected.Originally posted by @akinomyoga in #653 (comment)
The text was updated successfully, but these errors were encountered: