Skip to content

feat: Add default_values_if and default_values_ifs#6129

Merged
epage merged 1 commit intoclap-rs:masterfrom
cooronx:feat_default_values_if_and_default_values_ifs
Nov 19, 2025
Merged

feat: Add default_values_if and default_values_ifs#6129
epage merged 1 commit intoclap-rs:masterfrom
cooronx:feat_default_values_if_and_default_values_ifs

Conversation

@cooronx
Copy link
Copy Markdown
Contributor

@cooronx cooronx commented Sep 13, 2025

Fixes #5698

Comment thread clap_builder/src/builder/arg.rs Outdated
Comment thread clap_builder/src/builder/arg.rs Outdated
Comment thread tests/builder/default_vals.rs
@cooronx cooronx force-pushed the feat_default_values_if_and_default_values_ifs branch 2 times, most recently from f167424 to 6368060 Compare September 17, 2025 14:10
@smile9912
Copy link
Copy Markdown

@epage @cooronx Is there any plan to integrate this feature? I've encountered a similar issue and found that there are already existing pull requests...

Comment thread clap_builder/src/builder/arg.rs Outdated
Comment thread clap_builder/src/builder/arg.rs Outdated
@epage
Copy link
Copy Markdown
Member

epage commented Nov 17, 2025

Thanks for the ping on this. As a heads up, github doesn't always send notifications for force-pushes so you may need to post a message when doing so.

@cooronx cooronx force-pushed the feat_default_values_if_and_default_values_ifs branch from 6368060 to c2ced1a Compare November 19, 2025 12:33
@cooronx
Copy link
Copy Markdown
Contributor Author

cooronx commented Nov 19, 2025

Thanks for the ping on this. As a heads up, github doesn't always send notifications for force-pushes so you may need to post a message when doing so.

@epage change Vec<Option<OsStr>> to Option<Vec<OsStr>> and remove tests default_values_if when input is None

@epage
Copy link
Copy Markdown
Member

epage commented Nov 19, 2025

Thanks!

@epage epage merged commit 596e98c into clap-rs:master Nov 19, 2025
24 of 25 checks passed
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.

Add default_values_if to match default_values

3 participants