32 arg = command_node->
args[i];
34 if ((arg[0] ==
'"' && arg[len - 1] ==
'"') || (arg[0] ==
'\''
35 && arg[len - 1] ==
'\''))
38 free(command_node->
args[i]);
39 command_node->
args[i] = trimmed_arg;
52 else if (arg[0] ==
'$')
56 return (env_value_dup);
64 char *exit_status_dup;
68 return (exit_status_dup);
char * get_env(t_env *envp, const char *key)
char * get_shell_variable(t_env *shell_var, const char *key)
int ft_strcmp(const char *s1, const char *s2)
char * ft_strndup(const char *s, size_t n)
void ft_print_2d_arr(char **arr, char *name)
size_t ft_strlen(const char *s)
char * ft_strdup(const char *s)
char * get_env_variable(char *arg, t_ms_data *data)
void handle_trailing_quote(char *arg)
char * expand_env_and_loc_var(char *arg, t_ms_data *data)
char * get_exit_status(t_ms_data *data)
void final_quote_removal(int arg_count, t_ast *command_node)
char * exit_status_adj(char *arg)