-
Couldn't load subscription status.
- Fork 1.2k
completion: misc fixes #4076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
completion: misc fixes #4076
Conversation
- makes help output look the same as before iterative#3921
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 shtab#3zshsubcommands with hyphens-shtab>=1.0.2<- zsh: subcommands containing-shtab#4