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

Argument searching #10

Closed
Owez opened this issue Oct 9, 2021 · 2 comments
Closed

Argument searching #10

Owez opened this issue Oct 9, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Owez
Copy link
Owner

Owez commented Oct 9, 2021

Now that most everything else is finished, argument searching (for both generally and for if only used == true) is a must

@Owez Owez added the enhancement New feature or request label Oct 9, 2021
@Owez Owez self-assigned this Oct 9, 2021
@Owez
Copy link
Owner Author

Owez commented Oct 10, 2021

Either ctx.get("--argument") with this being a const fn for panics or cli_get!(ctx, --argument) which is uglier but macros are really the ideal case for this. The non-workaround would be ctx.get!(--argument) but this doesn't exist (yet)

@Owez
Copy link
Owner Author

Owez commented Oct 12, 2021

Done with data and get_arg/get_cmd. A further extension to this could and should be multiple parts in data like so:

ctx.data("subcmd --argument")

Instead of the current system which is:

ctx.get_cmd("subcmd").data("--argument")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant