-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Powershell not showing validation string #113
Comments
Thanks for creating the issue! We'll look into it and see what needs to be done to get this fixed. PRs appreciated! |
After some researches, I found that a bug in Powershell display foreground magenta the same as PS blue bg. nodejs/node#14243 A solution may be to change magenta to another color: Line 39 in b3d6295
https://github.com/enquirer/enquirer/blob/master/lib/prompt.js#L133 |
Great to know! Thanks for researching that! We should be able to detect PowerShell automatically to change colors. However, it seems like this would only be “hacking at the leaves” of the problem, since the same problem might occur in other terminals based on the user’s theme. In the spirit of accessibility, perhaps we should also consider allowing the user to change colors using a flag or env variable? Thoughts?
…Sent from my iPhone
On Jan 24, 2019, at 10:16 AM, Quentin Goinaud ***@***.***> wrote:
After some researches, I found that a bug in Powershell display foreground magenta the same as PS blue bg.
nodejs/node#14243
PowerShell/PowerShell#4266
A solution may be to change magenta to another color: https://github.com/enquirer/enquirer/blob/b3d6295e5046976d78d44731a88aebe0fecf2c7d/lib/styles.js#L39
https://github.com/enquirer/enquirer/blob/master/lib/prompt.js#L133
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yeah, that could be great to have a theme option to pass here: https://github.com/enquirer/enquirer#enquirer-1 for example.
My recommendation would be to just change magenta to, say, red. But I get that changing color might impact users already using the library as is.
This might be the most reasonable one. Your call ;) |
Basically I’m suggesting that we implement our best attempt at solving the problem by automatically using the best colors based on information we have available to us, but since we can’t detect everything, like the theme the user has chosen to use with their shell (I use Monokai for example), we should also provide a failsafe way of overriding our guesses.
…Sent from my iPhone
On Jan 24, 2019, at 12:03 PM, Quentin Goinaud ***@***.***> wrote:
Yeah, that could be great to have a theme option to pass here: https://github.com/enquirer/enquirer#enquirer-1 for example.
But if you do that, you let the responsibility to the accessibility to the user.
since the same problem might occur in other terminals based on the user’s theme
I don't think so, here it's clearly a bug in PS. Color should auto adapt based on bg color in most terminals.
My recommendation would be to just change magenta to, say, red. But I get that changing color might impact users already using the library as is.
We should be able to detect PowerShell automatically to change colors
This might be the most reasonable one.
Your call ;)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
OS: Windows 10
On cmd, the validation string is shown correctly, on PowerShell, it's not shown
The text was updated successfully, but these errors were encountered: