![]() ![]() Your prompt is not correct for your terminal type. The xterm program is the standard terminal emulator for the X Window System. It has hardcoded SGR control sequences for changing colour, and it has hardcoded the wrong ones, for another terminal type. It provides DEC VT102/VT220 and Tektronix 4014 compatible terminals for programs that cant use the window system directly. prints a shell command for setting the TERM and TERMCAP environment variables to indicate the current size of xterm window. If the underlying operating system supports terminal resizing capabilities (for example, the SIGWINCH signal in systems derived from 4. Is a wrapper script that modifies the current locale to use UTF-8 and starts xterm with the proper settings. Your terminal sets colours 8 to 15 in response to SGR 90–97 and SGR 100–107, which is what all the gibberish in the setaf and setab actually does.(The rest of the gibberish specifies that it sets colours 16 and upwards in response to SGR 38:5 and SGR 48:5, with the faulty separators.) Your prompt is trying to set colours 8 to 15 by setting colours 0–7 instead, and turning on boldface (with SGR 1).If you look carefully at your UXTerm screenshot you will see that that is exactly what UXTerm has in fact done, set a low-numbered colour and turned boldface on, just as your prompt asked. Nowadays uxterm is pretty much obsolete, but 15 years ago UTF-8 locales were rather esoteric, and the uxterm wrapper allowed people to easily test them without changing their normal environment. The other programs are not hardwiring control sequences, which is why they work. If you already use a UTF-8 locale like almost everyone does these days, uxterm is not needed or useful. Generate them with tput setaf and tput setab and use command substitution to place the result into your PS1 shell variable. Then it will work with many types of terminal and not just the one that you have hardwired. Ironically, the hardwiring that you, or the person who did that in your prompt, have chosen applies to a small minority of terminal types. Only the linux-16color terminal type in the terminfo database tries to set colours 8 to 15 that way, in fact. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |