mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix for extra newline that gets appended if a command is not found in
the new parser
This commit is contained in:
parent
44e94b8cfa
commit
20f9dd9a6b
1 changed files with 6 additions and 5 deletions
11
parser.cpp
11
parser.cpp
|
@ -3032,17 +3032,18 @@ void parser_t::get_backtrace(const wcstring &src, const parse_error_list_t &erro
|
||||||
if (filename)
|
if (filename)
|
||||||
{
|
{
|
||||||
prefix = format_string(_(L"%ls (line %lu): "), user_presentable_path(filename).c_str(), which_line);
|
prefix = format_string(_(L"%ls (line %lu): "), user_presentable_path(filename).c_str(), which_line);
|
||||||
//append_format(*output, _(L"%ls (line %lu):\n"), user_presentable_path(filename).c_str(), which_line);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
prefix = L"fish: ";
|
prefix = L"fish: ";
|
||||||
//output->append(L"fish: ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
output->append(err.describe_with_prefix(src, prefix, skip_caret));
|
const wcstring description = err.describe_with_prefix(src, prefix, skip_caret);
|
||||||
output->push_back(L'\n');
|
if (! description.empty())
|
||||||
|
{
|
||||||
|
output->append(description);
|
||||||
|
output->push_back(L'\n');
|
||||||
|
}
|
||||||
this->stack_trace(0, *output);
|
this->stack_trace(0, *output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue