New answers tagged

1

For OSX, this refers to Emacs 22.1.1; Fedora with Emacs 24 has the same behavior. Emac's ansi-term supports 8 colors. That is all that ANSI specified, and "ansi-term" is named appropriately. The eterm-color terminal description in ncurses is used for this terminal type. Emacs sets TERM to this value (see source): (defvar term-term-name "eterm-color" "...


0

less does not provide fine-tuning on the features which it displays, preferring to use video attributes such as bold and reverse (or standout): the ~ character is printed with bold attribute, and only if the "twiddle" option is set ("Show tildes after end of file"). while you could modify the terminal capabilities used to draw bold text, the "END" is ...


0

This is an old question so not sure if you still need the answer, but in case it helps someone else, here's what worked for me with Eclipse Mars and Fedora 24. You need to run Eclipse using GTK 2, and change the tooltip colours in your chosen GTK theme. My theme is Zukitre/ so I edited the gtkrc file here: sudo vi '/usr/share/themes/Zukitre/gtk-2.0/...


0

In many *nix distributions this is turned on by default in the users .bashrc. Edit ~/.bashrc and remove the line that looks like: alias ls='ls --color=auto' If you wish to disable this feature for all new accounts generated on this machine in the future, remove the same line from: /etc/skel/.bashrc


0

git config --global color.ui always git config --global color.branch always git config --global color.diff always git config --global color.interactive always git config --global color.status always git config --global color.grep always git config --global color.pager true git config --global color.decorate always git config --global color.showbranch always


1

If you want to switch profiles just like gnome-terminal (or konsole), that is making changes to a running terminal. xrdb will not do that. If you want to change the foreground/background default colors, you can use the xterm dynamic colors escape sequences (which rxvt-unicode implements, as I noted in Urxvt: change background color on the fly).


1

tmux (like GNU screen) works by translating the features of your actual terminal into an (often different) internal terminal. They do this to allow you to connect a session on different terminals at the same time, or at different times. When that works well, you will see the "same" text no matter where you are connecting from. Not all terminals support ...


2

urxvt 2.6 in 2004 added support for xterm's dynamic colors feature. In XTerm Control Sequences, this is OSC 11. OSC 10 sets the default text color. The changelog mentioned part of the change: 2.6 Fri Apr 2 03:24:10 CEST 2004 - minor doc corrections. - WARNING: changed menu sequence from ESC ] 10 to ESC ] 703 to avoid clashes ...


0

Most applications stick to 16 colors (8 dark colors and 8 bright colors) known as ANSI colors, because that's the common denominator supported by almost all terminals. The ANSI standard doesn't specify the exact shade, it just says “black”, “blue”, “red”, etc. The default blue shade is often a pure blue that is hard to read on a black background on an RGB ...


1

Nope, never have been able to read blue on black (and life is far too short to fiddle with colour customizations in every terminal or console combination I might use), so I disable colors by default. With xterm, an .Xdefaults entry of: XTerm*colorMode:false does wonders; otherwise, without a means to kill the colors in the terminal, application specific ...


2

I'd not offer to use eval if there are many other ways to do the task RED='\\033[0;31m' NC='\\033[0m' # No Color echo -e "$(sed "s=[^/]\+$=${RED}&${NC}=" <<<$var)" Due to use \ inside sed you should escape escape character - \\ or use Esc by itself to press Ctrl + V followed Esc


1

I'm not very good with shell escape sequences, but it seems to me that you are. I assume that what you're missing for your use-case, therefore, is to implement if/else-type logic. Here's one way you can do it: sed -e '\ /.*MINOR.*/{ # If .*MINOR.* is matched \ # Code to set MINOR color \ } \ /.*MINOR.*/!{ # If .*MINOR.* ...


3

You can put literal escape characters into /etc/issue as suggested in a comment (Red Hat does this, sometimes). In a quick test, that works, but only colors the text. The background is uncolored. In vi, the text might look like ^[]P7000000^[]P0F0F0F0\S Kernel \r on an \m and the result like this: If you clear the screen, then the colors fill the ...


1

GNU ls gives you a choice between coloring files by their type or (if a given type is not colored) by a pattern. That is done by the dircolors program which has a built-in database of types, patterns and colors. ls does not care about the directory path itself. The aspect of "where they refer to" is not easily done with that program. Symbolic links ...


0

All hard-linked files can be shown in bold-red by modifying the command LS_COLORS="*.tgz=01;31:mh=04" ls --color=auto foo.tgz to LS_COLORS="*.tgz=01;31:mh=04;01;31" ls --color=auto foo.tgz The mh= part of the LS_COLORS variable refers to hard-linked files. There is a table in the ls source code which does not appear in the documentation: enum ...


0

If your command works, simply put it in $HOME/.bashrc if you are using a bash shell. $HOME will be /root for root, /home/XYZ for user XYZ, etc. For ls command, you can create an alias like so (again, in bashrc): alias ls='ls --color=auto' You can always source the .bashrc file too in your current shell if you, for some reason, do not want to spawn a ...


1

After each line output, the ls command will reset the color. If you run dircolors -p you'll see a line RESET 0 # reset to "normal" color If you run dircolors on its own (which will output in LS_COLORS format) then you'll see 'rs=0'. So if you want ls to reset to a different color then you'll need to set up a custom LS_COLORS variable with rs=01;33 in ...


4

Problem descripton That's the wrong way of setting colours for ls. ls uses the terminal colours the same way that the prompt does. When dev is colored brown by ls it happens in a similar fashion to this: \[\033[0;33\]dev\[\033[0m\] And the terminal colour is switched back to the regular colour (\[\033[0m\]). From there on the regular colour is used to ...



Top 50 recent answers are included