Skip to content

Is it possible to calculate default values dynamically? #672

Answered by yajo
pfmoore asked this question in Q&A
Discussion options

You must be logged in to vote

Have you tried with the shell extension?

It should let you do something like:

# copier.yaml
_jinja_extensions:
  - jinja2_shell_extension.ShellExtension
email:
  default: "{{ 'git config user.email'|shell }}"

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@pfmoore
Comment options

@pawamoy
Comment options

@pfmoore
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@pfmoore
Comment options

@yajo
Comment options

@pfmoore
Comment options

@yajo
Comment options

Answer selected by pfmoore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants