minishell
minishell copied to clipboard
[DECISION] Assignments preceding a command are only applied for the duration of the command following it - with exceptions
We need to decide what parts of normal assignment we want to implement, if any.
Example:
bash-5.1$ HOME=/ cd
bash-5.1$ pwd
/
bash-5.1$ echo $HOME
/nfs/homes/ldulling
Exceptions are "special builtins" in POSIX mode:
- export
- exit
- unset
For these commands, the assignments are not just local to the command, but to the whole shell.