[BUG] `_` environment variable should not get created nor printed by export
Opened this issue · 0 comments
itislu commented
export
should ignore the _
(single underscore) env variable that can get inherited from the previous shell.
- Just
export
should not print an entry for_
. - Trying to create a variable like this
_=abc
should do nothing.
In bash, this variable always gets updated with the last argument to the previous simple command, after expansion.
And for the executed commands, this variable gets prepared with the full pathname of the command to be executed.
https://www.gnu.org/savannah-checkouts/gnu/bash/manual/html_node/Bash-Variables.html
To see the behavior, test with declare | grep _=
.