Shell: Do not parse history events in scripts

That makes no sense!
This commit is contained in:
AnotherTest 2021-03-05 16:14:53 +03:30 committed by Andreas Kling
commit a303b69caa
Notes: sideshowbarker 2024-07-18 21:39:50 +09:00
4 changed files with 11 additions and 9 deletions

View file

@ -1118,7 +1118,7 @@ RefPtr<AST::Node> Parser::parse_expression()
return read_concat(create<AST::CastToList>(move(list))); // Cast To List
}
if (starting_char == '!') {
if (starting_char == '!' && m_in_interactive_mode) {
if (auto designator = parse_history_designator())
return designator;
}