Skip to content

command variable assignment exports for function #79

@sewnie

Description

@sewnie

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
$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions