mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-24 19:51:14 -03:00
Specifically, this commit simply makes argparse issue an error if you use the ! syntax to define a validation script on an option that does not take any arguments. For example, "argparse foo!exit -- --foo" is now an error. This was previously accepted, despite that fact that the code after ! would never be executed (the ! code is only executed when an option is given a value). Alternatively, ! validation scripts could be made to execute even when no value was provided, but this break existing code that uses them with flags that take optional values.