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

command variable assignment exports for function #79

Open
apprehensions opened this issue Jan 3, 2024 · 0 comments
Open

command variable assignment exports for function #79

apprehensions opened this issue Jan 3, 2024 · 0 comments

Comments

@apprehensions
Copy link

If no command name results [from processing the command line], or if the command name is a special built-in or function, variable assignments shall affect the current execution environment. Otherwise, the variable assignments shall be exported for the execution environment of the command and shall not affect the current execution environment except as a side-effect of the expansions performed [while doing tilde expansion and other stuff to get the command line]

$ type true
true is a shell builtin
$ FOO=bar /bin/true
$ echo $FOO

$ FOO=bar true      
$ echo $FOO

$ true() builtin true
$ FOO=bar true        
$ echo $FOO
bar
$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant