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

Multiple long arguments #885

Open
icalvo opened this issue Apr 20, 2023 · 0 comments
Open

Multiple long arguments #885

icalvo opened this issue Apr 20, 2023 · 0 comments

Comments

@icalvo
Copy link

icalvo commented Apr 20, 2023

Oftentimes it is useful to offer multiple long arguments for an option. A common case is a lengthy long argument for which you want to have a shorter version but the 1-char is not possible (e.g. because it's already assigned to other option).

For example, I have an option DisableResourceWrites with a long arg --disableResourceWrites, for which I would like it to shorten to --drw (-d, -r and -w are already taken).

I would like to use it like:

[Option(new [] { "disableResourceWrite", "drw" }, Required = false, HelpText = "Download resources even if they are already downloaded.")]

The help would show up like:

--disableResourceWrite, --drw    Download resources even if they are already downloaded.

The unparsing would just choose the first long arg when short names are not preferred.

This was referenced Apr 20, 2023
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

No branches or pull requests

1 participant