forked from fish-shell/fish-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve compatibility with 16-color terminals.
Fish assumed that you could use tparm setaf/bg as long as the color was under 16 without even checking terminfo. Now, we will always let tparm take care of a color if it can. It will never use tparm if the terminal indicates a lack of support. When tparm cannot safely take care of this, we construct the escape ourselves. Now, fish no longer makes such a assumption, either, that it can use a fancy 256-color format for colors 0-16 when tparm can't do it natively. Add an intermediate formatter that can handle colors 0-16. That fixes the issue when tparm was pushed beyond its limits: env TERM='linux' ./fish -c 'set_color --background brred | xxd' ... and producing bogus escape output. Restores harmony to white, black ANSI color names and removes "grey". Fixes fish-shell#3176 Move comments from output.h to output.cpp
- Loading branch information
Showing
3 changed files
with
55 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters