emersion / mrsh

A minimal POSIX shell
MIT License
489 stars 35 forks source link

PATH=x command -v uses original PATH instead of x #151

Open Hello71 opened 4 years ago

Hello71 commented 4 years ago

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01

emersion commented 4 years ago

This applies to all builtins in general.

Hello71 commented 4 years ago

took a look at https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html, I think some other builtins affected (probably not exhaustive):

LC_MESSAGES=x anything-with-output
IFS=x read
HOME=x cd