diff --git a/srcs/parsing_var.c b/srcs/parsing_var.c index 395c0cc..f184a75 100755 --- a/srcs/parsing_var.c +++ b/srcs/parsing_var.c @@ -6,7 +6,7 @@ /* By: marde-vr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/02/09 15:24:36 by tomoron #+# #+# */ -/* Updated: 2024/02/18 12:41:23 by tomoron ### ########.fr */ +/* Updated: 2024/02/29 15:31:25 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,6 +28,8 @@ int get_var_len(char **command, t_env *env) char *env_var; (*command)++; + if(**command == '\'' || **command == '"') + return(1); if (!ft_isalnum(**command) && **command != '_' && **command != '?') return (2); if (**command == '?') @@ -93,6 +95,12 @@ int add_var_to_str(char *res, char **command, t_env *env) int i; i = 0; + if(**command == '\'' || **command == '"') + { + *res = '$'; + (*command)--; + return(1); + } if (!ft_isalnum(**command) && **command != '_' && **command != '?') { res[0] = '$';