functions: Fix command name

This was "function", needs to be "function*s*".

It was only an issue in the option parsing because we set cmd there
again instead of passing it. Maybe these should just be file-level constants?
This commit is contained in:
Fabian Boehm 2023-08-18 17:13:08 +02:00
parent fd68aca6ea
commit a29aa44183
2 changed files with 6 additions and 1 deletions

View File

@ -71,7 +71,7 @@ fn parse_cmd_opts<'args>(
parser: &mut parser_t,
streams: &mut io_streams_t,
) -> Option<c_int> {
let cmd = L!("function");
let cmd = L!("functions");
let print_hints = false;
let mut w = wgetopter_t::new(SHORT_OPTIONS, LONG_OPTIONS, argv);
while let Some(opt) = w.wgetopt_long() {

View File

@ -224,3 +224,8 @@ functions --details --verbose thisfunctiondoesnotexist
# CHECK: 0
# CHECK: n/a
# CHECK: n/a
functions --banana
# CHECKERR: functions: --banana: unknown option
echo $status
# CHECK: 2