summaryrefslogtreecommitdiff
path: root/Shell/Parser.cpp
diff options
context:
space:
mode:
authorPeter Elliott <pelliott@ualberta.ca>2020-07-15 09:30:52 -0600
committerAndreas Kling <kling@serenityos.org>2020-07-16 16:00:51 +0200
commit9c1da8fca113a8ac4df9cb82b0d5c03c6eb119be (patch)
treec989d40682fb4a0468a2f344bd181f0befcb717d /Shell/Parser.cpp
parent16fd5753eb3539946428a7c8bf934c8b39c9df7f (diff)
downloadserenity-9c1da8fca113a8ac4df9cb82b0d5c03c6eb119be.zip
Shell: Remove '[' and ']' as special shell characters
This makes the test utility work, when invoked as '['
Diffstat (limited to 'Shell/Parser.cpp')
-rw-r--r--Shell/Parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Shell/Parser.cpp b/Shell/Parser.cpp
index d7e038261a..c19f2d3664 100644
--- a/Shell/Parser.cpp
+++ b/Shell/Parser.cpp
@@ -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();