indicatif: Spinners in the examples don't render properly in the Windows Command Prompt
Hi! This is fairly minor, but I noticed that some examples don’t appear to show their spinners properly when run on the Windows Command Prompt. For example, with the multi
example:
As best as I can tell, this is due to using unsupported characters as the spinner. If I switch the spinner characters to "-\\|/ "
:
then it appears to show up properly.
I’m unsure of how this might be fixed - but it would be appreciated if spinners could default to supported characters on shells that may not support them.
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 16
You might look into what console (https://github.com/console-rs/console) supports, which is what indicatif leverages for feature detection.
Yeah, I don’t know how you might figure it out, though emoji support is probably a decent proxy (for just general Unicode support, which I think is what missing for these spinner code points).
And I definitely was not suggesting we should always use the non-Unicode characters by default – only in contexts where Unicode is not properly supported. I personally don’t have much context on how we’d figure that out, so I suggest you spend some time researching that aspect, for example by looking at the API of the console crate (and maybe other projects in the same space, like https://github.com/rust-cli/anstyle).