-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Support CommandWithArguments
hint for
#3266
Comments
In what way are you not seeing this supported? |
If I add
There is a debug_assert that requires the argument to be positional if it has the
|
I believe in this case the zsh completion would need to be different. Instead of using
That is, the first value is completed as a command name, and then every value after up to and including the value that matches the terminator are completed using See clap/clap_complete/src/shells/zsh.rs Line 392 in 453356e
|
Sorry, I somehow had missed that part of the code when searching
Sounds like loosening As an alternative, would per-value |
I'm guessing you ment That would probably be tricky to do. The arguments that use |
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the value_terminator into the zsh completion pattern when completing multi-length arguments on zsh to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: Follow the suggestion from clap-rs#3266 (comment) by including the value terminator in order to resolve the ambiguity. Closes clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Emit the user-defined value terminator into the zsh completion pattern to avoid doubled rest-arguments definitions: $ my-app <TAB> _arguments:comparguments:325: doubled rest argument definition: *::second -- second set of of multi-length arguments: clap-rs#3266 (comment) noted that including the value terminator is one step towards a robust solution for handling multiple multi-valued arguments. This change does not yet handle automatically detecting when a value terminator is needed, but it does add tests to ensure that user-specified value terminators are used on zsh. Related-to: clap-rs#3022 Signed-off-by: David Aguilar <davvid@gmail.com>
Please complete the following tasks
Clap Version
3.0.5
Describe your use case
I have an argument like:
Ideally, I would be able to use
.value_hint(ValueHint::CommandWithArguments)
for this, but since it isn't a positional argument, I can't.Describe the solution you'd like
Allow using
ValueHint::CommandWithArguments
for non-positional arguments, as long as:value_terminator
suppliedAlternatives, if applicable
possibly have a seperate hint type for this use case?
Additional Context
No response
The text was updated successfully, but these errors were encountered: