loreanvictor / tmplr

Automate Code Scaffolding
MIT License
26 stars 0 forks source link

An expression for selecting a file #30

Open loreanvictor opened 9 months ago

loreanvictor commented 9 months ago

While running reusable recipes, it is useful to allow the user choose one of their existing files (in the scope of the recipe). This is not currently possible with prompt and choices. It would look perhaps something like this:

prompt: Which file do you want to pick?
choose file: ./workflows/**/*

choose file accepts a glob. It can be enhanced to treat paths without any magic elements as folders and list files directly in that path.

Considerations: