Skip to content

Add default_values_if to match default_values #5698

@SuspiciousDuck

Description

@SuspiciousDuck

Please complete the following tasks

Clap Version

4.5.16

Describe your use case

I have an argument which takes a tuple. I also have a previous argument which is a String. I want to create 2 different defaults, depending on what the String is. This is impossible to implement because default_value_if does not accept a list [] for the value.

Describe the solution you'd like

I would like to see default_values_if and or default_values_ifs implemented.

Alternatives, if applicable

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-builderArea: Builder APIA-parsingArea: Parser's logic and needs it changed somehow.C-enhancementCategory: Raise on the bar on expectationsE-easyCall for participation: Experience needed to fix: Easy / not much

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions