Skip to content
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

[Draft] About for Possible Value #2733

Closed
wants to merge 4 commits into from

Conversation

ModProg
Copy link
Contributor

@ModProg ModProg commented Aug 21, 2021

This is just a draft for a possible implementation see also (#2731).

It supports:

.possible_value_about("bash","the default Shell")
.possible_value_about("fish","the friendly interactive Shell")
.possible_value("sh")

and

.possible_values_about(
    &[
        ("bash", "the default Shell"), 
        ("fish", "the friendly interactive Shell"),
        ("sh", "")
    ]
)
// or
.possible_values_about(
    &[
        ("bash", "the default Shell"), 
        ("fish", "the friendly interactive Shell")
    ]
)
.possible_value("sh")

This returns `"{a\t,b\t}"` instead of `"a b"` for possible_values
completion. Therefore fish displays and therefor hides the empty
description after the `\t`.

Fixes clap-rs#2727
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant