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

sphinx-quickstart blank prompts in PowerShell #5294

Closed
LemonPi opened this issue Aug 13, 2018 · 7 comments
Closed

sphinx-quickstart blank prompts in PowerShell #5294

LemonPi opened this issue Aug 13, 2018 · 7 comments

Comments

@LemonPi
Copy link

LemonPi commented Aug 13, 2018

Subject: using sphinx-quickstart with PowerShell (v1.0) in Windows results in blank prompts

Problem

image

Procedure to reproduce the problem

run sphinx-quickstart

Expected results

Works fine in git-bash
image

Environment info

  • OS: Windows 10
  • Python version: 3.6.5
  • Sphinx version: 1.7.6
@LemonPi
Copy link
Author

LemonPi commented Aug 13, 2018

This seems to be an unfortunate selection of font colour for the default PowerShell colouring scheme since I can select and copy the "blank" prompts...

@tk0miya
Copy link
Member

tk0miya commented Aug 13, 2018

Thank you for reporting.
Could you try this script in PowerShell console?

python -c 'from sphinx.util.console import purple; print(purple("Hello Sphinx"))'

At present, Sphinx uses purple for prompt of quickstart. If it is conflicted with PowerShell, we have to change it...

@tk0miya tk0miya added this to the 1.7.7 milestone Aug 13, 2018
@LemonPi
Copy link
Author

LemonPi commented Aug 13, 2018

@tk0miya Hey thanks for the quick response. print parses the colouring as text and we get garbage (in standard white colour): �[35mHello Sphinx�[39;49;00m

ANSI colour escape sequences don't seem to be working (they just print the escape sequence) - I've tried some other colours manually.

Using colorama works though

image

@LemonPi
Copy link
Author

LemonPi commented Aug 13, 2018

OK yeah the previous garbage printing was because colorama wasn't initialized. Initializing with color_terminal() we can see that purple needs to be changed.

image

@tk0miya
Copy link
Member

tk0miya commented Aug 13, 2018

Thank you for confirmation. Sorry, I'd perfectly forgotten about colorama.
Okay, let's change the color!

@LemonPi
Copy link
Author

LemonPi commented Aug 13, 2018

36 (cyan) seems to be a decent colour for PowerShell and cmd.
It's not easy to select a colour!

image

tk0miya added a commit to tk0miya/sphinx that referenced this issue Aug 17, 2018
tk0miya added a commit that referenced this issue Aug 19, 2018
…_windows

Fix #5294: sphinx-quickstart blank prompts in PowerShell
@tk0miya
Copy link
Member

tk0miya commented Aug 19, 2018

Fixed by #5312. It makes the questions bold font.
Thank you for reporting.

@tk0miya tk0miya closed this as completed Aug 19, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 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