Skip to content

Using a previous input as a default #22

@whitfin

Description

@whitfin

Hi! Stumbled on this whilst looking through the cargo template RFCs. From the docs, it's not obvious (at least for me) whether this is supported so I figured I'd just ask as it might be a good feature addition in future:

If I have a variable of "project", can I use the input the user provides in a default for another variable?

Here's an example of why, albeit a bit of a dumb one:

Let's pretend I want to generate a *_manifest.txt file. If you name your project "my", I would generate "my_manifest.txt" unless you chose to override the name to "other_manifest.txt". So I'd be using the project variable provided as the default for the manifest variable (or whatever).

Is this currently possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions