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
Fish does not work in a TTY session. #2070
Comments
It works for me (fish 2.1.1, Ubuntu 14.04.2). Could you elaborate the issue? |
Mabie it was the colors I was using the current version works fine It just prints weird characters before the prompt. |
My guess is that you are printing UTF-8 to a non-capable terminal. Can you confirm the version you are running, the version of Ubuntu you are using and the value of |
|
I also meant to ask for the output of |
Basically, I'm wondering if you're seeing this - http://superuser.com/questions/556993/how-to-display-unicode-in-a-linux-virtual-terminal |
I'm sorry I switched linuxes I'm now using Sabayon and have not checked for the same problems but I believe my locale was probably en_UTF8. |
I have this problem too, but after I switched to the default theme, it works fine. I guess it is the problem of unicode character support in framebuffer, since it doesn't work with some arrows. |
I don't think there's much we can do about this. AFAICT, the text-mode console only supports 16 colours and 512 glyphs, and even with fbdev supporting more colors the console fonts don't implement all of Unicode anyway. KMSCON is probably the way to go if you need arrows or many fancy colors on your terminal. |
What about disabling arrows in framebuffer by changing the fish theme? if test $SSH_TTY
printf '% '
return 0
end |
Wouldn't isatty be more idomatic? |
Sorry I didn't meant to post that here. What I mean is: # If login shell, don't do anything
if status --is-login; and function fish_prompt; echo -n '% '; end; end _Note_: I uses
|
printf needs two "%"'s to print a literal "%", i.e:
(the and is unnecessary since "if" has not only a condition but also a body, and the "$TERM = linux" is the more accurate check - an xterm can also run a login shell) Really, I don't think this is going to improve much - the in-kernel VT sucks, which is why things like "kmscon" and the spun-off "systemd-consoled" exist. What we can do is add a fallback prompt to all sample prompts that kicks in when "$TERM = linux" like I did above (note: this should be in the fish_prompt function so it switches without needing to go through fish_config again), and we can also add fallback-colors since VTs aren't going to support 256 colors. Or we can recommend people use a userspace-vt (like kmscon) and actually have a nice experience. |
Since I'm not quite sure GH notifies for references, I'm gonna say it here again: I'm okay with #2311 - I've written it after all. If any of you isn't, please speak up and we'll try to find an alternative solution. |
Fixed by f71e877. |
In ubuntu if you set fish as your default shell and press ctrl+alt+f1 log in and use fish, the history colors etc are all broken.
The text was updated successfully, but these errors were encountered: