Since ZSH completions use `[ and ]` for descriptions, but clap args use `[ and ]` for possible
values and other auxillary arg information, this was creating a conflict. clap now escapes any
square brackets before writing the help, i.e. `\\[ and \\]` which removes conflicts.
Alternatives would be to switch `[ and ]` for `( and )` but this would create a slight difference
in help messages and completions.
Closes#771
imp(Completions): adds fallbacks to Bash completions
With these options, in case the completion function cannot provide suggestions, Bash will perform its default completions, based on e.g. files, directories, and variable names.
This is particularly noticeable in tools that operate on paths, like ripgrep: when I type `rg should_panic te<TAB>`, I want the shell to autocomplete `tests/`, but right now the completion script will simply beep without any suggestions.
With these options, in case the completion function cannot provide
suggestions, Bash will perform its default completions, based on e.g.
files, directories, and variable names. This is particularly useful for
argument values.
Prior to this commit setting `number_of_values(1)` and `multiple(true)` would cause the help
message alignment to be off. This commit fixes that.
Closes#760
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.