function: Fix a broken format string

This commit is contained in:
Fabian Boehm 2023-12-01 18:14:54 +01:00
parent aa904f0304
commit fe9d1228e1
2 changed files with 6 additions and 1 deletions

View file

@ -156,7 +156,7 @@ fn parse_cmd_opts(
if pid.is_err() || pid.unwrap() < 0 { if pid.is_err() || pid.unwrap() < 0 {
streams streams
.err .err
.append(wgettext_fmt!("%ls: %ls: invalid process id", cmd)); .append(wgettext_fmt!("%ls: %ls: invalid process id", cmd, woptarg));
return STATUS_INVALID_ARGS; return STATUS_INVALID_ARGS;
} }
let pid = pid.unwrap(); let pid = pid.unwrap();

View file

@ -162,4 +162,9 @@ end
rm -r $tmpdir rm -r $tmpdir
function foo -p bar; end
# CHECKERR: {{.*}}function.fish (line {{\d+}}): function: bar: invalid process id
# CHECKERR: function foo -p bar; end
# CHECKERR: ^~~~~~~~~~~~~~~~~~~^
exit 0 exit 0