-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Couldn't push as a PR as it's based on another PR #380
But here is the code: https://github.com/0k/cookiecutter/commits/pr-better-prompt
It uses the context argument and interpret help, default,
regex attributes.
Example::
context:
name:
help: "Module name (ie: sale_trinkets)"
regex: '[a-zA-Z0-9_]+'
website:
help: "Website (ie: http://www.yourwebsite.com)"
default:
regex: '[^ ]+'
Optional values and the ones having an empty default value.
A value without default value is considered required.
If the context meta information dict is detected, it'll trigger the behavior.
There are missing tests for now, but I just wanted first to feel the heat for such PR before spending too much time on it.
It passes all normal tests and so proves that nothing tested was broken.
I guess this could be 2cents for the discussions at #30, #360, #169...
Ho, and this is a full template repo that I use with this:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels