Skip to content

allow arguments with short flag only long optional#124

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

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

Conversation

@syrshax

@syrshax syrshax commented Jan 23, 2026

Copy link
Copy Markdown

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
Comment thread argparse_test.go
Comment thread argparse_test.go Outdated
Comment thread argparse_test.go Outdated
Comment thread argparse_test.go Outdated

@jlombera jlombera left a comment

Copy link
Copy Markdown

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.

Comment thread command.go Outdated
Comment thread argparse.go Outdated

Copy link
Copy Markdown

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
Copy Markdown
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!

@stale

stale Bot commented Jun 28, 2026

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon if no further activity occurs. Thank you for your contributions. Feel free to comment or otherwise update to keep it alive.

@stale stale Bot added the stale-issue The issue has been stale for some time. label Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale-issue The issue has been stale for some time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants