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

Add Command::mut_args to modify all arguments of a Command #5051

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

joshtriplett
Copy link
Contributor

@joshtriplett joshtriplett commented Jul 29, 2023

This implements the mut_args method proposed in #5050 .

Convenient when you want to modify most or all arguments, without having
to call mut_arg for each one and name them all.

There may be a more efficient implementation that doesn't involve recreating
an entire Vec.

Fixes #3002

Convenient when you want to modify most or all arguments, without having
to call `mut_arg` for each one and name them all.
@epage
Copy link
Member

epage commented Aug 1, 2023

FYI we had #2966 and then reverted it in #2994 because the use case was limited and handled in other ways while the old implementation of clap led to the design being more complicated.

Since then, we've been tracking this in #3002.

@epage epage merged commit 56048d8 into clap-rs:master Aug 1, 2023
@joshtriplett joshtriplett deleted the mut-args branch August 1, 2023 02:27
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.

Ability to apply a setting to all args
2 participants