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

feat: support option whose names ends with - and : #311

Merged
merged 2 commits into from
Apr 9, 2024
Merged

feat: support option whose names ends with - and : #311

merged 2 commits into from
Apr 9, 2024

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Apr 9, 2024

use - to mark prefixed option, but use -- to escape name ends with -
use : to mark assiged option, but use :: to escape name ends with :

# @option --oa1-
# @option --oa2--
# @option --ob1:
# @option --ob2::
USAGE: prog [OPTIONS]

OPTIONS:
      --oa1 <OA1>
      --oa2- <OA2>
      --ob1=<OB1>
      --ob2: <OB2:>
prog --oax1 v1 --oax2 v2 
prog --oa2- v1
prog --ob1=v1
prog --ob2: v1

@sigoden sigoden changed the title feat: support option whose names ends with '-' or ':' feat: support option whose names ends with - and : Apr 9, 2024
@sigoden sigoden merged commit 4c876fc into main Apr 9, 2024
3 checks passed
@sigoden sigoden deleted the feat branch April 9, 2024 05:45
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.

1 participant