Improve situation for linux in-kernel VTs (TERM = "linux") #2311
Conversation
This adds a special colorscheme and prompt function guaranteed to work on a VT and activates them automatically if $TERM = "linux". set_color is overridden to only allow the 8 colors VTs have (under the assumption those are always the same) and the color variables are shadowed with global ones so they don't pollute our nice capable terms.
I've now merged this as f71e877 since nobody objected. |
set -g fish_color_operator cyan | ||
set -g fish_color_quote blue | ||
set -g fish_color_autosuggestion yellow | ||
set -g fish_color_valid_path |
zanchey
Aug 31, 2015
Member
Is there supposed to be an argument here?
Is there supposed to be an argument here?
faho
Aug 31, 2015
Author
Member
There probably should be. The default happens to not break, though.
There probably should be. The default happens to not break, though.
# Don't allow setting color other than what linux offers (see #2001) | ||
functions -e set_color | ||
function set_color | ||
set -l term_colors black red green yellow blue magenta cyan white normal |
zanchey
Aug 31, 2015
Member
Sorry for the late review, but I'm not sure this is actually required; set_color
should detect a non-256-colour terminal and adjust behaviour accordingly - although I haven't tested it so I might well be wrong.
Sorry for the late review, but I'm not sure this is actually required; set_color
should detect a non-256-colour terminal and adjust behaviour accordingly - although I haven't tested it so I might well be wrong.
faho
Aug 31, 2015
Author
Member
This is more to inform the user - set_color won't set the color (try it with purple), but it won't exit with an error status or print any error message.
This is more to inform the user - set_color won't set the color (try it with purple), but it won't exit with an error status or print any error message.
It seems that this has broken |
See 40df11b - bold actually works, underlines don't break anything and printing colors is... well, printing not setting. |
That fix the bold, but there is an still error for background. |
I could have sworn that background doesn't work, but apparently it does. See b231ab7. |
_Bingo!_ It is working now. Good luck and have a nice day! |
This adds a special colorscheme and prompt function (a clone of the "classic" prompt) guaranteed to work
on a VT and activates them automatically if $TERM = "linux".
set_color is overridden to only allow the 8 colors VTs have (under the
assumption those are always the same) and the color variables are
shadowed with global ones so they don't pollute our nice capable terms.
Fixes #2070.
Everyone okay with the approach or should we bend over backwards even harder?