mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-26 07:41:15 -03:00
Allow parse_util_detect_errors to treat incomplete strings as errors
Fixes bug where sourcing a file with an unclosed quote would not have a backtrace
This commit is contained in:
@@ -447,7 +447,7 @@ static int builtin_complete(parser_t &parser, wchar_t **argv)
|
||||
{
|
||||
const wcstring condition_string = condition;
|
||||
parse_error_list_t errors;
|
||||
if (parse_util_detect_errors(condition_string, &errors))
|
||||
if (parse_util_detect_errors(condition_string, &errors, false /* do not accept incomplete */))
|
||||
{
|
||||
append_format(stderr_buffer,
|
||||
L"%ls: Condition '%ls' contained a syntax error",
|
||||
|
||||
Reference in New Issue
Block a user