One can now use `Arg::allow_hyphen_values(true)` which will enable `--opt -val` style values only
for the specific arg and not command wide.
Closes#742
Flags, Opts, and Positionals now store their internals using compartmented Base, Valued, and
Switched structs to keep the code duplication down and make it easier to maintain.
Iniside the src/app/parser.rs there have been several changes to make reasoning about the code
easier. Primarily moving related sections out of the large get_matches_with into their own
functions.
Make `update-contributors` a quiet recipe
I noticed that this is a common pattern in justfiles, recipes that
run a lot of commands and prefix every line with `@` so that
only output is printed.
So I added quiet recipes, which are recipes where the recipe name
is prefixed with a `@`.
Inside quiet recipes the usual meaning of `@` is inverted. Only
lines starting with `@` are echoed.
This diff makes the `update-contributors` recipe a quiet recipe,
and gets rid of all those unsightly `@`s.
PS I just added this in v0.2.21, so you'll need to install the latest version
from crates.io to test.
PPS Thanks for using just! I was super excited to see a justfile in this repo,
since I'm a huge fan of clap.
docs: fix broken docs links
These links are relative to the root of the server instead of the current file. This breaks causes them to be broken on docs.rs.
DOCS: Simple documentation updates
README still had a mistake regarding YAML parsing, and the README and lib.rs referenced the wrong folder name for tests.
Completion support for PowerShell.
Fixes#729
---
Requires PS 5.0+ for the `Microsoft.PowerShell.Core\Register-ArgumentCompleter` commandlet. Earlier versions using the equivalent commandlet from TabExpansionPlusPlus may work, but I haven't tested that. PS 5.0 is available for Windows 7 and non-Windows anyway.
The resulting script can be used by pasting it into the PS profile or saving it to a file and sourcing it into the PS profile in the usual way.
Now one can build CLIs that support things like `mv <files>... <target>`
There are a few requirements and caveats;
* The final positional argument (and all positional arguments prior) *must* be required
* Only one positional argument may be `multiple(true)`
* Only the second to last, or last positional argument may be `multiple(true)`
Closes#725