Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected bracket expansion in the __prompts__ value #1958

Open
vit-zikmund opened this issue Oct 10, 2023 · 0 comments
Open

Unexpected bracket expansion in the __prompts__ value #1958

vit-zikmund opened this issue Oct 10, 2023 · 0 comments

Comments

@vit-zikmund
Copy link

  • Cookiecutter version: 2.4.0
  • Template project url:
  • Python version: 3.11.5
  • Operating System: Linux

Description:

Unexpected bracket expansion in the __prompts__ value that eats values inside brackets that are directly followed by a lowercase letter 😮

What I've run:

Simply running cookiecutter . in a directory having just this little cookiecutter.json:

{
  "entry": null,
  "__prompts__": {
    "entry" : "prefix [bracket content] suffix"
  }
}

The prompt looks like this, with the [bracket content] left out (but only if it contains a lowercase letter):

$ cookiecutter .
  [1/1] prefix  suffix:

This is pretty wild, it seems some processing is taking place inside of the prompt value, eating what's in those brackets. Nothing struck me as obvious while skimming the original PR introducing human prompts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant