Closed twolfson closed 10 years ago
For reference, I used snapscreenshot
to capture the image which I found after a quick Google search.
In linux you can test if you're in a tty by doing `if [[ $"TERM" = "linux" ]]; then``.
Of course, some crazy person could set their TERM to linux
although they're not in a tty. But they shouldn't.
That saiid, I suspect your problem might be a result of your local font configuration. The fonts used in a framebuffer must support the unicode space we use, but I believe they don't by default. I'll see if I can duplicate and then fix this issue and report back.
Yep, while $TERM
might have the info we want we should always rely on feature detection (e.g. tput
) over environment detection. If we can't do that, then we should implement overrides and add documentation for non-unicode overrides.
Okay, I have generated a list of all valid unicode characters and walked through them in getty
.
It looks like there are arrows in high range and as greek characters. I would prefer to document the high range arrows and ASCII alternatives:
# High range arrows
dirty unpushed: *↑
dirty unpulled: *↓
dirty unpushed unpulled: *↑↓
# ASCII only
dirty unpushed: *^
dirty unpulled: *v
dirty unpushed unpulled: *^v
Have you started on the override branch or only exploring font detection? If you haven't done the override, I would like to implement that since it should be quite straight forward.
I uploaded the files to the following gist:
WARNING: The gist has 64k lines of output so it might hang your browser
Nope, nothing yet. Go for it.
1 PR coming up
Resolved in 0.23.0
Another case for our resolution of whether a font supports specific characters can be found in #50 which is X11 forwarding on a Docker container.
I encountered a scenario when the current set of
git
symbols are incomprehensible/inaccurate. Inside of agetty
session (ctrl+alt+f1 on a Linux machine). It made me realize we should add some form of detection for support (not sure if possible) and allow for overriding.