clap/clap_complete/tests
Ed Page f70ebe89a7 fix!: Require explicit help/version disabling
Before we introduced actions, it required specific setups to engage with
claps version and help printing.  With actions making that more
explicit, we don't get as much benefit from our multiple, obscure, ways
of users customizing help

Before
- Modify existing help or version with `mut_arg` which would
  automatically be pushed down the command tree like `global(true)`
- Create an new help or version and have it treated as if it was the
  built-in on (I think)
- Use the same flags as built-in and have the built-in flags
  automatically disabled
- Users could explicitly disable the built-in functionality and do what
  they want

Now
- `mut_arg` no longer works as we define help and version flags at the
  end
- If someone defines a flag that overlaps with the built-ins by id,
  long, or short, a debug assert will tell them to explicitly disable
  the built-in
- Any customization has to be done by a user providing their own.  To
  propagate through the command tree, they need to set `global(true)`.

Benefits
- Hopefully, this makes it less confusing on how to override help
  behavior.  Someone creates an arg and we then tell them how to disable
  the built-in
- This greatly simplifies the arg handling by pushing more
  responsibility onto the developer in what are hopefully just corner
  cases
- This removes about 1Kb from .text

Fixes #3405
Fixes #4033
2022-08-10 20:33:21 -05:00
..
snapshots fix!: Require explicit help/version disabling 2022-08-10 20:33:21 -05:00
bash.rs feat(complete): Minimal rust-completion 2022-04-27 15:49:58 -05:00
common.rs fix!: Require explicit help/version disabling 2022-08-10 20:33:21 -05:00
dynamic.rs fix(complete): Correctly detect positionals 2022-04-27 15:53:02 -05:00
elvish.rs test(complete): Use official extensions for snapshots 2022-04-22 16:21:10 -05:00
examples.rs test(complete): Option to verify examples 2022-04-27 09:03:47 -05:00
fish.rs test(complete): Use official extensions for snapshots 2022-04-22 16:21:10 -05:00
general.rs test(complete): Ensure we infer path completions from value_parser 2022-06-16 09:59:30 -05:00
powershell.rs test(complete): Use official extensions for snapshots 2022-04-22 16:21:10 -05:00
zsh.rs test(complete): Use official extensions for snapshots 2022-04-22 16:21:10 -05:00