fix: add ~ as env var name delimiter

This commit is contained in:
starnakin 2023-07-05 21:14:09 +02:00
parent a5b42a6c7f
commit d311595352

2
src/env/env.c vendored
View File

@ -177,7 +177,7 @@ static char* get_key(const char* key_start)
if (strncmp(key_start, "~", 1) == 0) if (strncmp(key_start, "~", 1) == 0)
return strdup("~"); return strdup("~");
size_t i = 1; size_t i = 1;
while (key_start[i] != '\0' && strchr("\t $\"\'", key_start[i]) == NULL) while (key_start[i] != '\0' && strchr("\t $\"\'~", key_start[i]) == NULL)
i++; i++;
return (strndup(key_start, i)); return (strndup(key_start, i));
} }