Juan-aga / Minishell

The Unlicense
2 stars 1 forks source link

Handle environment variables #13

Closed emartinez-dev closed 1 year ago

emartinez-dev commented 1 year ago
Juan-aga commented 1 year ago

Created the function ft_getenv(char str, t_ms *ms). It returns a pointer to the value of the variable in ms->env. @emartinez-dev now it's pending the lexer.

Juan-aga commented 1 year ago

MOD: function "t_envlst ft_getenv(char str, t_ms *ms). It now return a pointer to the node of envlst of ms->exp. if it exist we the value if in value variable of the node. else returns NULL.

emartinez-dev commented 1 year ago

Done, I have created the function void expand_tokens(t_lexer *lexer, t_ms *ms) that checks if there is any env variable in the token and replaces it