mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 00:52:46 +08:00
string: Also stop printing documentation
Especially as, in this case, the documentation is quite massive. Caught by porting string's test to littlecheck. See #3404 - this was already supposed to be included.
This commit is contained in:
parent
60edc9a45d
commit
77d8487078
|
@ -55,7 +55,7 @@ static void string_error(io_streams_t &streams, const wchar_t *fmt, ...) {
|
||||||
static void string_unknown_option(parser_t &parser, io_streams_t &streams, const wchar_t *subcmd,
|
static void string_unknown_option(parser_t &parser, io_streams_t &streams, const wchar_t *subcmd,
|
||||||
const wchar_t *opt) {
|
const wchar_t *opt) {
|
||||||
string_error(streams, BUILTIN_ERR_UNKNOWN, subcmd, opt);
|
string_error(streams, BUILTIN_ERR_UNKNOWN, subcmd, opt);
|
||||||
builtin_print_help(parser, streams, L"string", streams.err);
|
builtin_print_error_trailer(parser, streams.err, L"string");
|
||||||
}
|
}
|
||||||
|
|
||||||
// We read from stdin if we are the second or later process in a pipeline.
|
// We read from stdin if we are the second or later process in a pipeline.
|
||||||
|
@ -1344,7 +1344,7 @@ int builtin_string(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
||||||
int argc = builtin_count_args(argv);
|
int argc = builtin_count_args(argv);
|
||||||
if (argc <= 1) {
|
if (argc <= 1) {
|
||||||
streams.err.append_format(BUILTIN_ERR_MISSING_SUBCMD, cmd);
|
streams.err.append_format(BUILTIN_ERR_MISSING_SUBCMD, cmd);
|
||||||
builtin_print_help(parser, streams, L"string", streams.err);
|
builtin_print_error_trailer(parser, streams.err, L"string");
|
||||||
return STATUS_INVALID_ARGS;
|
return STATUS_INVALID_ARGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1359,7 +1359,7 @@ int builtin_string(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
||||||
}
|
}
|
||||||
if (!subcmd->handler) {
|
if (!subcmd->handler) {
|
||||||
streams.err.append_format(BUILTIN_ERR_INVALID_SUBCMD, cmd, argv[1]);
|
streams.err.append_format(BUILTIN_ERR_INVALID_SUBCMD, cmd, argv[1]);
|
||||||
builtin_print_help(parser, streams, L"string", streams.err);
|
builtin_print_error_trailer(parser, streams.err, L"string");
|
||||||
return STATUS_INVALID_ARGS;
|
return STATUS_INVALID_ARGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -189,6 +189,12 @@ string match: ^
|
||||||
# string invalidarg
|
# string invalidarg
|
||||||
string: Subcommand 'invalidarg' is not valid
|
string: Subcommand 'invalidarg' is not valid
|
||||||
|
|
||||||
|
Standard input (line 215):
|
||||||
|
string invalidarg; and echo "unexpected exit 0"
|
||||||
|
^
|
||||||
|
|
||||||
|
(Type 'help string' for related documentation)
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# string length
|
# string length
|
||||||
|
|
||||||
|
@ -271,6 +277,12 @@ string repeat: Expected argument
|
||||||
# string repeat -l fakearg 2>&1
|
# string repeat -l fakearg 2>&1
|
||||||
string repeat: Unknown option '-l'
|
string repeat: Unknown option '-l'
|
||||||
|
|
||||||
|
Standard input (line 291):
|
||||||
|
string repeat -l fakearg
|
||||||
|
^
|
||||||
|
|
||||||
|
(Type 'help string' for related documentation)
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# string repeat ""
|
# string repeat ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user