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

Fix help display for non-String RawRepresentables #494

Merged

Commits on Sep 19, 2022

  1. Fix help display for non-String RawRepresentables

    RawRepresentable types that have a non-String raw value are having
    values displayed in the help screen by converting the RawRep value
    into a string. However, these values are by default parsed by their
    raw value, so we should use that for display instead.
    
    This is accomplished by adding a defaultValueDescription
    implementation for all ExpressibleByArgument-conforming RawValue
    types, and then basing the allValues implementation on that.
    This generalizes the existing overloads for String-based RawRep types,
    while also allowing users who customize their ExpressibleByArgument
    implementation to provide the correct help value for clients.
    natecook1000 committed Sep 19, 2022
    Copy the full SHA
    38f0df6 View commit details
    Browse the repository at this point in the history