loreanvictor / tmplr

Automate Code Scaffolding
MIT License
27 stars 0 forks source link

Typing `.` doesn't replace the default prompt text #34

Closed fwextensions closed 10 months ago

fwextensions commented 10 months ago

I have a basic prompt:

  - read: outputDir
    prompt: Where do you want to create it?
    default:
      eval: '{{ pluginName | kebab-case }}'

If the pluginName is test, say, then it shows that as the default text. I'd expect when typing any character that the "selected" default text will be replaced. But if I type ., it gets prepended to the default text:

image

If I want to enter just ., I have to type it and then delete the rest of the default text.

loreanvictor commented 10 months ago

ok it seems this issue happens with all characters that aren't alphanumeric. here's a sandbox replicating the issue:

https://stackblitz.com/edit/stackblitz-starters-1gh5yu?file=.tmplr.yml

loreanvictor commented 10 months ago

@fwextensions this should be fixed on 0.3.1, please re-open if you are still encountering this issue.