mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 04:22:40 +08:00
Fix error for "fish --foo" without option argument
Wgetopt needs a ":" at the beginning to turn on this type of error. I'm not sure why that is now, and we might want to change it (but tbh wgetopt could do with a replacement anyway). Fixes #11049
This commit is contained in:
parent
ba4ead6ead
commit
fb2caf63e5
@ -528,7 +528,7 @@ fn fish_parse_opt(args: &mut [WString], opts: &mut FishCmdOpts) -> ControlFlow<i
|
||||
const PRINT_DEBUG_CATEGORIES_ARG: char = 2 as char;
|
||||
const PROFILE_STARTUP_ARG: char = 3 as char;
|
||||
|
||||
const SHORT_OPTS: &wstr = L!("+hPilNnvc:C:p:d:f:D:o:");
|
||||
const SHORT_OPTS: &wstr = L!("+:hPilNnvc:C:p:d:f:D:o:");
|
||||
const LONG_OPTS: &[WOption<'static>] = &[
|
||||
wopt(L!("command"), RequiredArgument, 'c'),
|
||||
wopt(L!("init-command"), RequiredArgument, 'C'),
|
||||
|
@ -111,5 +111,8 @@ $fish --no-config -c 'echo notprinted | and true'
|
||||
# CHECKERR: echo notprinted | and true
|
||||
# CHECKERR: ^~^
|
||||
|
||||
$fish --no-config --features
|
||||
# CHECKERR: fish: --features: option requires an argument
|
||||
|
||||
# Regression test for a hang.
|
||||
echo "set -L" | $fish > /dev/null
|
||||
|
Loading…
x
Reference in New Issue
Block a user