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

Bump case-app, add names limit to HelpFormat, move some name aliases, add test #2280

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

MaciejG604
Copy link
Contributor

@MaciejG604 MaciejG604 commented Jul 11, 2023

Fixes #1883
Related to alexarchambault/case-app#480

Some name aliases were moved to the top of the list of @Names so that they are displayed in the short help. In this way we get full option name displayed and possibly a single letter flag for it.

Rules for limiting name aliases are:
Using the namesLimit = Some(N) parameter in HelpFormat would pick N-1 first name aliases + the main name.
For example, for option:

    @ExtraName("fourOption")
    @ExtraName("f")
    @ExtraName("four")
    @ExtraName("fOpt")
    fourth: Int = 0

and namesLimit = Some(2) will result in --fourth, --four-option getting displayed
and for full help -f, --four, --f-opt, --fourth, --four-option

@MaciejG604 MaciejG604 enabled auto-merge (squash) July 14, 2023 10:05
@MaciejG604 MaciejG604 merged commit 35b7c0d into VirtusLab:main Jul 14, 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

Successfully merging this pull request may close these issues.

Limit aliases for options in --help
2 participants