Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] _ environment variable should not get created nor printed by export #174

Open
2 tasks
itislu opened this issue Feb 14, 2024 · 0 comments
Open
2 tasks
Labels
bug Something isn't working lea wontfix Lea will not work on this
Milestone

Comments

@itislu
Copy link
Collaborator

itislu commented Feb 14, 2024

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 _=.

@itislu itislu added the bug Something isn't working label Feb 14, 2024
@itislu itislu added this to the Builtins milestone Feb 14, 2024
@LeaYeh LeaYeh added the lea wontfix Lea will not work on this label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lea wontfix Lea will not work on this
Projects
None yet
Development

No branches or pull requests

2 participants