Commit graph

33 commits

Author SHA1 Message Date
Ed Page
1e4ec5f4f0 fix: Deprecation warnings 2022-02-11 15:59:03 -06:00
Ed Page
d3f5d7ce34 fix: Clarify Arg/ArgGroup id's role
This adjusts names.  Adjusting the derive naming (and re-naming) is left
to #2475.

Fixes #3335
2022-02-11 14:11:50 -06:00
Ed Page
272f840178 feat: Replace core set of AppSettings with functions
This is a part of #2717

Some settings didn't get getters because
- They are transient parse settings (e.g. ignore errors)
- They get propagated to args and should be checked there

`is_allow_hyphen_values_set` is a curious case.  In some cases, we only
check the app and not an arg.  This seems suspicious.
2022-02-11 12:35:09 -06:00
Ed Page
9bd7060089 fix: Deprecate various APIs
- ArgSettings are part of #2717
- Errors are part of #2628
- `help_heading` is part of #1807 and #1553
- Some misc parts are for API consistency
2022-02-10 19:37:47 -06:00
Ed Page
47d76742eb feat: Add Arg getters for all settings
This is prep for #2717
2022-02-10 10:18:41 -06:00
Ed Page
5c3868ea4c chore: Release 2022-02-05 09:33:39 -06:00
Ed Page
28ea108374 docs: Update changelog 2022-02-05 09:33:12 -06:00
Haim Ashkenazi
c90a48bf0b More failing tests, hope this will end it :( 2022-02-05 17:16:40 +02:00
Haim Ashkenazi
3c2cea9754 Fixed failing test 2022-02-05 17:09:06 +02:00
Haim Ashkenazi
bf98b1bded Allow completion of partial commands
Based on solution suggested here by @benedictleejh:
    https://github.com/clap-rs/clap/issues/2750
2022-02-05 16:49:21 +02:00
Ed Page
e5b06c3061 chore: Release 2022-01-24 10:54:50 -06:00
Ed Page
ac43b7baee docs: Update changelog 2022-01-24 10:54:04 -06:00
Ed Page
afb2a3dd05 docs(complete): Clarify some panic conditions 2022-01-21 08:29:38 -06:00
Ed Page
b488aab46c fix: Clarify some unwraps as expects
This was inspiredby #3322
2022-01-21 08:27:18 -06:00
Ed Page
4a43b51a42 fix(complete): Handle help completions
The main motivation was to reduce special cases by putting all of the
logic in one place.
2022-01-17 09:23:04 -06:00
Ed Page
7b7c76e3d0 chore: Release 2022-01-15 18:51:41 -06:00
Ed Page
1c89abaa5b docs: Update changelog 2022-01-15 18:51:23 -06:00
Clifton King
658b7a0841 fix(complete): Fix unescaped single quotes in zsh
help strings for subcomand args did not escape single quotes
2022-01-15 14:33:11 -06:00
rndhouse
85cac43672
Fix broken CONTRIBUTING.md URL. 2022-01-13 15:14:08 +00:00
Ed Page
3d8ce3f426 chore: Release 2022-01-12 11:12:42 -06:00
Ed Page
0439dc221f docs: Update changelogs 2022-01-12 11:11:53 -06:00
Ed Page
37f47dd260 docs: Add completion changelogs 2022-01-12 11:04:57 -06:00
cherryblossom
6d27488602
fix(complete): Use Elvish v0.17 lambda syntax
[Elvish v0.17][1] deprecated the old lambda syntax (`[arg1 arg2] { body }`)
in favour of the new `{|arg1 arg2| body }` syntax. This commit uses the
new syntax to stop deprecation warnings.

[1]: https://elv.sh/blog/0.17.0-release-notes.html#deprecated-features
2022-01-12 11:58:18 +11:00
xylous
e2f4d2827e
fix(complete): Add newline at end of zsh output 2022-01-09 19:51:18 +02:00
Ed Page
d9906eb150 chore: Release 2022-01-04 09:49:41 -06:00
Daniel Eades
7f71d642cd style: prefer 'char' to 'str' for single character patterns 2022-01-04 09:20:08 -06:00
Ed Page
d392b88bd5 chore: Release 2022-01-03 12:12:28 -06:00
Marti Raudsepp
f10c5d18d9 docs(complete): Fix imports in documentation
Use `shells::Bash` instead of `generators::Bash`
2022-01-02 21:10:18 +02:00
Ed Page
c01ebbac17 chore: Release 2021-12-31 14:35:02 -06:00
Ed Page
bc951e4e53 chore: Release 2021-12-31 13:37:28 -06:00
Ed Page
19b59a2df8 fix(complete): Better organize the API 2021-12-31 13:25:09 -06:00
Ed Page
8d73a0e80f chore: Release 2021-12-31 12:23:47 -06:00
Ed Page
88a335ff97 fix(complete): Give crates more specific names
`clap_generate` originally intended to be "generate anything".  With
`fig`, we already broke one part out.  With #3174's man support, we are
also looking at keeping it separate:
- More freedom to iterate on the API
- Uniqueness (and potential weight) of its dependencies
- man generation is normally more for distribution while completions are
  a mix of being distributed with the app or the app generating the
  completions (which will be exacerbated if we move most completion
  parsing logic to be in Rust)

So `clap_generate` is having a lot more limited of a role than the
original name conveys.   I worry the generic name will be a hindrance to
people discovering and using it (yes, documentation can help but there
are limits).

I hesitated because we are on the verge of releasing 3.0. However, doing
it even later will be even more disruptive because more people will be
using it (crates.io lists ~70 people using `clap_generate`).

To ease things, we are still releasing `clap_generate` as a wrapper
around `clap_complete`.
2021-12-31 12:03:29 -06:00