completion: misc fixes#4076
Conversation
- makes help output look the same as before treeverse#3921
efiop
left a comment
There was a problem hiding this comment.
So a hack for now 🙁 Is there a possibility to make shtab not affect this in the future?
|
Not a hack? Argparse always adds The 29 places where There are 2 options:
I prefer (1) followed by (2a) and then (2b), but let me know your thoughts cc @iterative/engineering |
|
@casperdcl I mean that this metavar overwrite is only needed because we use shtab, we didn't use metavars before. Ideally, shtab shouldn't require the users to use such hacks, but at the same time this not that bad, just need to document it. Maybe it could even be used to our advantage if we could make the auto-generated metavar look better, but I'm not even sure it is possible. |
|
When you say "auto-generated metavar" what do you mean?
|
|
@casperdcl I mean |
yes
That never happens (previously or currently). Instead, with Now, with
This was the case with Now, with The options we have are:
In all proposed options, we have trivial full control over outputting
There are 3 side-effects so I don't know which you refer to:
Side-effects (2) and (3) are trivially globally configurable by one line of code, side-effect (1) is a built-in argparse feature if using |
|
So the question is - can we make shtab to not use choices? |
The only way I can see is the third option above with:
where |
|
For the record: #4148 uses |
shtabdependency (>=1.0.2)daemon)shtab>=1.0.0completion: autogenerate #3921 (comment)shtab>=1.0.0<- hide SUPPRESSed options iterative/shtab#3zshsubcommands with hyphens-shtab>=1.0.2<- zsh: subcommands containing-iterative/shtab#4