fish-shell/src/builtins
Fabian Homborg 0781473564 argparse: Jump to the next option after an unknown one
Previously, when we got an unknown option with --ignore-unknown, we
would increment woptind but still try to read the same contents.

This means in e.g.

```
argparse -i h -- -ooo -h
```

The `-h` would also be skipped as an option, because after the first
`-o` getopt reads the other two `-o` and skips that many options.

This could be handled more extensively in wgetopt, but the simpler fix
is to just skip to the next argv entry once we have an unknown option
- there's nothing more we can do with it anyway!

Additionally, document this and clearly explain that we currently
don't transform the option.

Fixes #8637
2022-01-15 12:17:43 +01:00
..
argparse.cpp argparse: Jump to the next option after an unknown one 2022-01-15 12:17:43 +01:00
argparse.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
bg.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
bg.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
bind.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
bind.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
block.cpp builtins/block: correct an errant comment 2022-01-09 22:00:58 +08:00
block.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
builtin.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
builtin.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
cd.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
cd.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
command.cpp command -v: exit 127 if command not found 2021-12-11 22:15:26 -08:00
command.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
commandline.cpp builtin commandline: add option to determine if pager is fully disclosed 2021-12-04 22:43:39 +01:00
commandline.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
complete.cpp Don't escape tildes that come from custom completions 2021-11-27 17:05:46 +01:00
complete.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
contains.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
contains.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
disown.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
disown.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
echo.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
echo.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
emit.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
emit.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
eval.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
eval.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
exit.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
exit.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
fg.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
fg.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
function.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
function.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
functions.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
functions.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
history.cpp Bravely stop removing quotes in builtin history delete 2021-12-12 14:26:45 -08:00
history.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
jobs.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
jobs.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
math.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
math.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
printf.cpp printf: Explain what couldn't be converted 2021-11-20 17:44:05 +01:00
printf.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
pwd.cpp Fix some extra arguments for string format functions. 2021-12-12 14:06:17 -08:00
pwd.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
random.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
random.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
read.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
read.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
realpath.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
realpath.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
return.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
return.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
set.cpp Clean up check_global_scope_exists 2021-11-14 13:07:02 -08:00
set.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
set_color.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
set_color.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
source.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
source.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
status.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
status.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
string.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
string.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
test.cpp test: Also print proper caret for too many arguments 2021-12-24 16:08:41 +01:00
test.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
type.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
type.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
ulimit.cpp ulimit.cpp: doesn't need to #include io.h 2021-11-09 17:51:58 -08:00
ulimit.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
wait.cpp Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00
wait.h Let's make src/ easier to grok, move builins to src/builtins 2021-11-09 17:39:10 -08:00