bombshell-dev / clack

Effortlessly build beautiful command-line apps
https://clack.cc
5.25k stars 88 forks source link

[Bug] when adding initiailValue there's a trailing underscore which seems to be a cursor #127

Open kashive opened 1 year ago

kashive commented 1 year ago

Environment

Describe the bug A clear and concise description of what the bug is. When adding initiailValue for promptText there's a trailing underscore which seems to be a cursor; this leads to confusing experience, especially if we already have an underscore in the text

To Reproduce Include a link to a minimal reproduction using node.new

const name = await promptText({
    message:
      "What's the secret name?",
    initialValue: 'MY_TOP_SECRET',
  });

Results in: image

Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen. There should be no underscore that acts like a cursor. Just the cursor should be displayed.

Additional Information If applicable, add screenshots to help explain your problem.