I parsed the environment variables to be stored in a list within the main minishell struct. For each node in that list, there is the name of the environment variable and the value stored within it. I have a block of code within the function to print the final result.
The purpose of this is for us to be able to easily locate the string whenever $ is encountered, allowing us to replace it with the value of the variable.
There is an extra flag within the env_var nodes which is regarding the printing. Ignore that for now because I might remove it later. It may be used to help with the difference in behavior of the printing of env and export.
I parsed the environment variables to be stored in a list within the main
minishell
struct. For each node in that list, there is the name of the environment variable and the value stored within it. I have a block of code within the function to print the final result.The purpose of this is for us to be able to easily locate the string whenever
$
is encountered, allowing us to replace it with the value of the variable.There is an extra flag within the
env_var
nodes which is regarding the printing. Ignore that for now because I might remove it later. It may be used to help with the difference in behavior of the printing ofenv
andexport
.