iomentum / cargo-scaffold

cargo scaffold lets you scaffold and generate projects described in a simple TOML file
MIT License
57 stars 12 forks source link

Scaffold Parameter's default value is not used. #52

Open gabhijit opened 6 months ago

gabhijit commented 6 months ago

The Scaffold parameter struct Parameter has an optional default value. When this value is given this needs to be honored.

For instance for a 'select' type parameter, this is set (to value at index 0), but this can be set for other type of parameters as well - like string, integer etc.

For this we can use something like dialoguer::Input::default.

Currently setting default value on a parameter has no effect as one has to enter the value always.