[Toybox] Env sh runs toysh instead of system shell
Rob Landley
rob at landley.net
Sat Jul 6 13:00:18 PDT 2019
On 7/5/19 3:34 PM, Denys Nykula wrote:
>> enabled toysh in your config
>> didn't select "Disable recursive execution"
>> I'm not going to special case env.
>
> Both settings are intentional. Had learned that one of common env usages is to
> specifically to opt out of shell builtins and force PATH lookup for one
> command, like in answers below. Is this wrong? When one wants builtins, they
> just set variables before the command name, no?
>
> https://unix.stackexchange.com/questions/103467/what-is-env-command-doing
> https://stackoverflow.com/questions/29540540/how-do-i-prevent-bash-to-use-a-builtin-command
Hmmm... Ok, that is a good reason to special case it.
(The _reason_ env ordinarily bypasses shell builtins is env isn't part of the
shell, so it's an implementation detail rather than an explicit design goal, but
the usage pattern not only exists but is documented in the wild, so...)
Rob
More information about the Toybox
mailing list