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

Hide default value when user starts typing #717

Closed
erhhung opened this issue Aug 16, 2018 · 1 comment
Closed

Hide default value when user starts typing #717

erhhung opened this issue Aug 16, 2018 · 1 comment

Comments

@erhhung
Copy link

erhhung commented Aug 16, 2018

For prompt type input, if the prompt has a default value, it is shown after the prompt in parentheses, followed by the cursor.

The user only has 3 choices here (and only 2 until recently):

  1. press enter to accept the default value
  2. type a different value and then enter
  3. press delete and then enter for empty value (Allow empty input by removing default if user enters backspace on empty input #700)

Currently, if you start typing, your text is rendered after the default value, which the user presumably has already decided that he does not care. The main issue for me is that if the default value is really long (see example below), the new value can easily─and unnecessarily─wrap onto the next line.

? Destination: (/Users/example/Documents/My Project/output) ~/Documents/My Reports/today▐ 

I could, as choice 3 states, press delete first and then start typing, but why not just clear the default value automatically? I think it's reasonable that the user has only one chance to accept the default value by pressing enter; press anything else, your answer counts!

@SBoudrias
Copy link
Owner

I think this is reasonable. How do you feel about sending a PR? :)

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

2 participants