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

Typing Control-U in sphinx-quickstart clears the line #5036

Closed
asmeurer opened this issue Jun 3, 2018 · 5 comments
Closed

Typing Control-U in sphinx-quickstart clears the line #5036

asmeurer opened this issue Jun 3, 2018 · 5 comments

Comments

@asmeurer
Copy link
Contributor

asmeurer commented Jun 3, 2018

To reproduce, start sphinx-quickstart test, start typing something for the first answer, and press Control-U. The entire question line is cleared, rather than just what was typed.

Environment info

  • OS: Mac
  • Python version: 3.5
  • Sphinx version: 1.7.4
@tk0miya tk0miya added this to the 1.7.6 milestone Jun 5, 2018
@tk0miya
Copy link
Member

tk0miya commented Jun 5, 2018

This might be come from the fix for #3364. We have to use input() to protect prompt.

@asmeurer
Copy link
Contributor Author

asmeurer commented Jun 5, 2018

Maybe you just needed to wrap your ANSI escapes with \[ and \].

@tk0miya
Copy link
Member

tk0miya commented Jun 7, 2018

What did you mean? Wrapping all escape sequences with \[ and \]?
I'm not good at console manipulation. Please let me know your idea.

Thanks,

@asmeurer
Copy link
Contributor Author

asmeurer commented Jun 7, 2018

Actually it needs to be \1 and \2. Like \1ESCAPECODE\2. Those are \[ and \] in bash but not in Python. Those tell readline that the ANSI codes are zero-width (invisible). It's hard to find good docs on this, but it's mentioned at https://tiswww.case.edu/php/chet/readline/readline.html

tk0miya added a commit that referenced this issue Jun 14, 2018
Fix #5036: quickstart: Typing Ctrl-U clears the whole of line
@tk0miya
Copy link
Member

tk0miya commented Jun 14, 2018

Fixed by #5059.
Thank you for reporting.

@tk0miya tk0miya closed this as completed Jun 14, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants