mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 18:51:15 -03:00
Simplify check for bare builtin invocation
This commit is contained in:
@@ -3579,8 +3579,7 @@ fn new_decorated_statement(slf: &mut Populator<'_>) -> StatementVariant {
|
||||
// e.g. a "naked if".
|
||||
let naked_invocation_invokes_help =
|
||||
![ParseKeyword::Begin, ParseKeyword::End].contains(&self.peek_token(0).keyword);
|
||||
if naked_invocation_invokes_help
|
||||
&& [ParseTokenType::terminate].contains(&self.peek_token(1).typ)
|
||||
if naked_invocation_invokes_help && self.peek_token(1).typ == ParseTokenType::terminate
|
||||
{
|
||||
return new_decorated_statement(self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user