From e28b7b21d308d7963aea6317a0a83e9de6ac0f45 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Sun, 15 Dec 2024 03:20:16 +0100 Subject: sh: Add setting environment variables --- userland/minibox/utilities/sh/lexer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'userland/minibox/utilities/sh/lexer.c') diff --git a/userland/minibox/utilities/sh/lexer.c b/userland/minibox/utilities/sh/lexer.c index 09fc2ff..52126b4 100644 --- a/userland/minibox/utilities/sh/lexer.c +++ b/userland/minibox/utilities/sh/lexer.c @@ -24,7 +24,7 @@ int is_special_char(char c) { if (isalnum(c)) { return 0; } - return !(('>' != c && '|' != c && '&' != c)); + return !(('>' != c && '|' != c && '&' != c && '=' != c)); } int parse_chars(struct sv *code_ptr, struct TOKEN *cur) { @@ -54,6 +54,7 @@ int parse_operand(struct sv *code_ptr, struct TOKEN *cur) { TRY_PARSE_STRING(">", TOKEN_STREAM); TRY_PARSE_STRING("|", TOKEN_PIPE); TRY_PARSE_STRING("&", TOKEN_BACKGROUND); + TRY_PARSE_STRING("=", TOKEN_EQUAL); TRY_PARSE_STRING("\n", TOKEN_NEWLINE); // Failed to parse -- cgit v1.2.3