aboutsummaryrefslogtreecommitdiff
path: root/src/env.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-08-19 16:37:13 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-08-19 16:37:13 +0200
commit957434ecd3c8170aafc145263b0090863ceadba3 (patch)
tree5a218179d7c282a87564dbf6eb89beb603c3385b /src/env.c
parente77b1667e23a05f2874f80f5e47e634c58180c37 (diff)
downloadminishell-957434ecd3c8170aafc145263b0090863ceadba3.tar.gz
minishell-957434ecd3c8170aafc145263b0090863ceadba3.tar.bz2
minishell-957434ecd3c8170aafc145263b0090863ceadba3.zip
Removing glob, Rewritting preprocessing with escape and interpolation only
Diffstat (limited to 'src/env.c')
-rw-r--r--src/env.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/env.c b/src/env.c
index 589c83e..a80797f 100644
--- a/src/env.c
+++ b/src/env.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/28 09:21:24 by cacharle #+# #+# */
-/* Updated: 2020/07/16 08:44:28 by charles ### ########.fr */
+/* Updated: 2020/08/19 10:23:55 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -97,6 +97,8 @@ char *env_search_first_match(t_env env, const char *haystack)
size_t i;
size_t key_len;
+ if (!ft_isalnum(*haystack) && *haystack != '_' && *haystack != '?') // $ alone
+ return ("$");
if (ft_isdigit(*haystack))
return (NULL);
len = 0;