Skip to content

Automatically replace dashes - with underscores _ in example names, if necessary #18

@rnag

Description

@rnag

Is your feature request related to a problem? Please describe.

It would be cool if we can automatically replace dashes - with underscores _ (or vice versa) if we determine that a user-entered example name with dashes - is not a valid example, but that it would be instead valid with _.

The main impetus for this is that it is somewhat easier to type a dash - on a keyboard - don't need to make a beeline for the shift key, for example. 🤔

Describe the solution you'd like

Current output when running cargo run --example, when mis-typing _ as - for instance:

PS serde-this-or-that> cargo run --example as-string
error: no example target named `as-string`

        Did you mean `as_string`?

Desired output:

PS serde-this-or-that> rx as-string

>> cargo run --example as_string
[result of running the `as_string` example]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions