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 assigned options #310

Merged
merged 3 commits into from
Apr 8, 2024
Merged

feat: support assigned options #310

merged 3 commits into from
Apr 8, 2024

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Apr 8, 2024

The asssigned option must be assigned a value using the =, the name of asssigned option must have ':` suffix.

# @option --oa:
# @option --ob
# @option --oc:*

--oa: and --oc:* both have : suffix, they are assigned options, but --ob are not.

prog --oa=v1
prog --oa v1  #  error
prog --oc v1

A realworld example is tail -f/--follow

# @option -f --follow:[name|descriptor] <KIND?>
tail -f <path>
tail --follow <path>
tail --follow=name <path>

@sigoden sigoden merged commit 5842639 into main Apr 8, 2024
3 checks passed
@sigoden sigoden deleted the feat-assigned-options branch April 8, 2024 11:15
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