Skip to content

allow arguments with short flag only long optional#124

Open
syrshax wants to merge 8 commits intoakamensky:v1from
syrshax:feat/allow-arguments-short-optional-long
Open

allow arguments with short flag only long optional#124
syrshax wants to merge 8 commits intoakamensky:v1from
syrshax:feat/allow-arguments-short-optional-long

Conversation

@syrshax
Copy link

@syrshax syrshax commented Jan 23, 2026

as detailed in the issue #123 now tools can no longer have a limitation of forcing long flags

as detailed in the issue akamensky#123 now tools can no longer have a limitation
of forcing long flags
Copy link

@jlombera jlombera left a comment

Choose a reason for hiding this comment

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

I don't have any say on this (not owner/maintainer/contributor) but LGTM.

argparse.go Outdated

Choose a reason for hiding this comment

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

This needs update too. Currently the help message when the long name is empty is printed this this:

  -s  --       <Help string>

Following change fixed it for me:

if argument.lname != "" {
    arg = arg + "--" + argument.lname
}

Which results in following message:

  -s           <Help string>

Copy link
Author

Choose a reason for hiding this comment

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

Thank you again for the feedback!

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