Skip to content

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

Description

@itislu

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglea wontfixLea will not work on this

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions