mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-24 01:11:15 -03:00
Fix builtin $var expansion
A special case added for #1252 needed adjustment. Fixes #5639
This commit is contained in:
@@ -1195,9 +1195,10 @@ static bool detect_errors_in_plain_statement(const wcstring &buff_src,
|
||||
|
||||
// Check that we don't do an invalid builtin (issue #1252).
|
||||
if (!errored && decoration == parse_statement_decoration_builtin &&
|
||||
!builtin_exists(command)) {
|
||||
expand_one(*unexp_command, 0, null_environment_t{}, parse_errors) &&
|
||||
!builtin_exists(*unexp_command)) {
|
||||
errored = append_syntax_error(parse_errors, source_start, UNKNOWN_BUILTIN_ERR_MSG,
|
||||
command.c_str());
|
||||
unexp_command->c_str());
|
||||
}
|
||||
}
|
||||
return errored;
|
||||
|
||||
Reference in New Issue
Block a user