Stop printing help summary on error

This now displays

- the error message

- a (significantly shorter) backtrace

- A call to open `help $cmd` if necessary

See #5434.
Fixes #3404.
This commit is contained in:
Fabian Homborg
2019-03-26 19:13:01 +01:00
parent 88a935d8d1
commit 88d2d54276
15 changed files with 71 additions and 132 deletions

View File

@@ -230,7 +230,7 @@ int builtin_function(parser_t &parser, io_streams_t &streams, const wcstring_lis
if (retval != STATUS_CMD_OK) return retval;
if (opts.print_help) {
builtin_print_help(parser, streams, cmd, streams.err);
builtin_print_error_trailer(parser, streams.err, cmd);
return STATUS_CMD_OK;
}