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

Align flag alias with normal use #85

Merged

Conversation

jhilmer
Copy link
Contributor

@jhilmer jhilmer commented Dec 28, 2024

Align use of '-' and '--' with other CLI parsers
The use a single '-' is usually for short options a single char. Also
the way it is used in all tests. One of the example has an alias "ag"
which currently is parsed if the argument is '-ag' with this change
aliases with more the a single char need to be parsed with double
dash - as e.g. '--ag'

The use a single '-' is usually for short options a single char. Also
the way it is used in all tests. One of the example has an alias "ag"
which currently is parsed if the argument is '-ag' with this change
aliases with more the a single char need to be parsed with double
dash - as e.g. '--ag'
This is also the normal behavior of CLI arg parsers - you can group
mutilple short options with a single dash.
@jhilmer jhilmer force-pushed the align-flag-alias-with-normal-use branch from 7f4e14e to ea29a49 Compare December 28, 2024 16:37
@ksk001100 ksk001100 self-requested a review December 28, 2024 17:37
@ksk001100
Copy link
Owner

@jhilmer
I tried verifying it, but it seems that long_alias is not working correctly, so please fix it and add a test.

@jhilmer jhilmer force-pushed the align-flag-alias-with-normal-use branch from 9ba3222 to e88ffef Compare January 3, 2025 11:20
Copy link
Owner

@ksk001100 ksk001100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ksk001100 ksk001100 merged commit fe356f4 into ksk001100:master Jan 3, 2025
6 checks passed
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.

2 participants