mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
Shell: Remove '[' and ']' as special shell characters
This makes the test utility work, when invoked as '['
This commit is contained in:
parent
16fd5753eb
commit
9c1da8fca1
Notes:
sideshowbarker
2024-07-19 04:46:50 +09:00
Author: https://github.com/petelliott Commit: https://github.com/SerenityOS/serenity/commit/9c1da8fca11 Pull-request: https://github.com/SerenityOS/serenity/pull/2812 Reviewed-by: https://github.com/alimpfard ✅
@ -450,7 +450,7 @@ RefPtr<AST::Node> Parser::parse_expression()
|
||||
return expr;
|
||||
};
|
||||
|
||||
if (strchr("&|[]){} ;<>\n", starting_char) != nullptr)
|
||||
if (strchr("&|){} ;<>\n", starting_char) != nullptr)
|
||||
return nullptr;
|
||||
|
||||
if (isdigit(starting_char)) {
|
||||
@ -728,7 +728,7 @@ RefPtr<AST::Node> Parser::parse_bareword()
|
||||
auto rule_start = push_start();
|
||||
StringBuilder builder;
|
||||
auto is_acceptable_bareword_character = [](char c) {
|
||||
return strchr("\\\"'*$&#|()[]{} ?;<>\n", c) == nullptr;
|
||||
return strchr("\\\"'*$&#|(){} ?;<>\n", c) == nullptr;
|
||||
};
|
||||
while (!at_end()) {
|
||||
char ch = peek();
|
||||
|
Loading…
Reference in New Issue
Block a user