It is possible to use colors on the Unix command-line interface.

learn more… | top users | synonyms (1)

3
votes
2answers
46 views

Yellow appears as brown in konsole

For some reason, the yellow color color (ANSI Esc. code 33), appears for normal fonts as orange/brownish in my terminal (yakuake, konsole). For example, the command echo -e "\\033[33mhello ...
1
vote
1answer
45 views

Why are files and directories colored in different ways? [duplicate]

On Ubuntu 14.04, in bash under gnome terminal, Why are files especially directories colored in different ways? The green colors hide the text to me (How about to you?). Is it done by terminal or ...
4
votes
1answer
490 views

Set tmux status line color based on hostname

I'd like tmux to pick a color dynamically based on the hostname of the machine. Since I share my tmux.conf across several machines, assigning an unique color for each of those hosts would be handy ...
6
votes
1answer
686 views

Program similar to xcalib to invert desktop colors

I'm using xcalib to invert colors on my computer at home. I have two monitors at work, and unfortunately the xcalib -i -a inverts only one of them (the one I don't want to invert). I haven't found any ...
3
votes
1answer
53 views

rlwrap -z pipeto: piping output through pagers

I am using rlwrap to colorize prompt in asterisk CLI: rlwrap -s 99999 -a -pRED /usr/sbin/asterisk -r I read in man rlwrap that I can also use rlwrap -z pipeto to pipe output through a ...
0
votes
0answers
21 views

Changes to be commited half green half red [migrated]

Last time I used git add . and git status after I got this output: Why is the output colored this way, and why are the paths ordered so oddly? For example: ...
1
vote
1answer
35 views

Saving colored output regardless of the source

How can I save colored output to a file regardless of the source when the sources turn coloring off if they detect their stdout isn't a terminal?
94
votes
11answers
114k views

Colorizing your terminal and shell environment?

I spend most of my time working in Unix environments and using terminal emulators. I try to use color on the command line, because color makes the output more useful and intuitive. What options exist ...
1
vote
1answer
153 views

How can i change the color in the panel when a program needs attention?

I'm running Linux Mint 14. I want to change the color in the panel when a program requires your attention (like when you receive a chat message). Not the color of the entire panel, but only the box ...
28
votes
3answers
5k views

Colors in Man Pages

When I look at a man page in my 'console' (not an xterm) I see some coloration, but I don't get this in my xterm's (e.g. konsole) is there any way I can enable this? hopefully a fairly simple ...
21
votes
4answers
6k views

How can you change the GNU screen status line based on hostname?

I have a shared home directory that is automounted via NFS on all the UNIX servers I log in to. I would like to have a single .screenrc that (for example) puts the hostname in the hardstatus line in a ...
84
votes
4answers
20k views

Can less retain colored output?

Can I get less not to monochrome its output? E.g., the output from git diff is colored, but git diff | less is not.
12
votes
3answers
10k views

How to get VIM to display 256 colors properly

I'm trying to get 256 color theme files to work with VIM under xterm. This is peaksea how it looks for me: How it should look: I've tried following the tips on the wiki page to no avail. set ...
0
votes
1answer
35 views

Colorize line number in grep

Is there a way to colorize line numbers when using grep with the -n option? For example, echo "hello" | grep -n lo outputs 1:hello where lo is colorized in red (being the match). Can I configure ...
6
votes
5answers
2k views

Invert colours on Dual-Screen / Dual-Monitor setup?

In order to invert colours on monitor, I invoke: xcalib -invert -alter The problem is, that on Dual-Monitor setup it inverts colors only on first screen. I can not use Compitz gadgets for color ...
1
vote
0answers
27 views

using ansi escape codes to change the background color in xfce4-terminal

This works to change the background color for the entire terminal with xterm: printf '\033]10;%s\a\033]11;%s\a' Blue Red It doesn't work in xfce4-terminal, tho. Is there something that will work? ...
101
votes
14answers
46k views

How to have tail -f show colored output

I'd like to be able to tail the output of a server log file that has messages like: INFO SEVERE etc, and if it's SEVERE, show the line in red; if it's INFO, in green. What kind of alias can I ...
12
votes
3answers
454 views

No colored output in less for the ls command

If I run ls I get colored output which I find pretty handy for quickly getting a glance of the kind of file. When I try to pipe it to less even with the -r and -R flags the coloring always get lost. I ...
2
votes
1answer
50 views

Diff tool with nice output like kdiff3

I like kdiff3 very much due to the way it displays the result. It can compare more than two versions of a file or directory and displays the differences in columns: For directories, it displays ...
14
votes
7answers
5k views

Converting colored output into html

There are tools providing coloured output: dwdiff -c File1 File2 # word level diff grep --color=always # we all know this guy ... The question is: How to convert their colored output of arbitrary ...
2
votes
1answer
36 views

Is it possible to make VIM emphasize found text?

As vim wiki's stated we can look up strings by using *. But by default, looked up string is not being emphasized. Is it possible to configure vim that the strings will be emphasized when looked up ...
19
votes
4answers
16k views

Dark blue color in vim or ls output in linux

I have a problem with dark-blue color in vim or ls output. Because I'm using black background color, words colored in dark-blue are almost completely invisible. How can I address this problem?
3
votes
1answer
76 views

How to clean stdout/stderr color output

I have a program that would output something like this: ^[0;33m"2015-02-09 11:42:36 +0700 114.125.x.x access"^[0m Is there built in linux program that could clean that output up into something like ...
0
votes
1answer
145 views

Solarized theme in both mc and Terminator

I have configured Terminator to use Solarized color theme. I did the same for MC. However, the problem I have is that I don't get actual Solarized color scheme in MC (as there already is one below ...
20
votes
3answers
21k views

CLICOLOR and LS_COLORS in bash

I have the following setup in .bashrc for coloring of listings. export CLICOLOR=1 export ...
12
votes
3answers
15k views

dircolors: modify color settings globaly

I understand ls uses dircolors to display colored output. dircolors has default database of colors associated with file extensions, which can be printed wiht the command dircolors --print-database ...
16
votes
3answers
8k views

tmux, TERM and 256 colours support

Introduction My question arises from the necessity of understanding why I have now (after multiple trials) Terminal and tmux supporting 256 colours and tput colors telling me there are only 8 of ...
0
votes
1answer
38 views

Change the way folders are displayed in terminal [duplicate]

I moved over from Xubuntu to Fedora. In a colored Xubuntu terminal the folders appear in bold blue wheras in Fedora they appear as normal blue. I'm familiar with ANSI codes for colors and style but ...
20
votes
6answers
11k views

Removing control chars (including console codes / colours) from script output

I can use the "script" command to record an interactive session at the command line. However, this includes all control characters and colour codes. I can remove control characters (like backspace) ...
0
votes
0answers
40 views

wrong MC colors when launched via xterm -e mc

I use ini-customized color theme in Midnight Commander 4.8. [Colors] base_color=linux:normal=cyan,rgb002:input=white,cyan:inputunchanged=black,cyan:dhotnormal=red When I launch xterm and then ...
2
votes
0answers
35 views

Disable colours at runtime in xterm

I would like to disable colours in my xterm at runtime. Reason being that some programs lack the sanity to use them in proper way. For example: $ sane-program color output $ disable-color $ ...
3
votes
1answer
1k views

How to change a font/background color in transparent windows?

When you select something, the color of the selection usually changes to the font color, and the font color is being set to backgroud color. So, if you have a black background in a terminal, and the ...
8
votes
2answers
2k views

Get colors in less command with ccze: Shift + g doesn't go to the end of file?

In all the tools to get colors with less command: -R, Pygments, GNU Source-highlight, vless, ... ccze make me sastified with below command: ccze -A < /path/to/log/file | less -R but Shift+g ...
12
votes
1answer
772 views

Documentation on LESS_TERMCAP_* variables?

I see these pretty colors in manpages viewed with less when setting a bunch of these variables. What do they mean, where is the documentation? Is this interpreted by less or termcap? screenshot
6
votes
2answers
107 views

How to determine the current color of the console output?

I know that, if a coloured terminal is available, one can colour the output of it using escape characters. But is there a possibility to find out, which colour the output is currently being displayed ...
2
votes
1answer
36 views

Disable of coloring for ls on NTFS filesystems

I like to have the output of ls colored so I quickly can spot files of specific types, however I have a separate disk in my computer which uses a ntfs-3g filesystem, this means that everything has ...
1
vote
1answer
52 views

preserving colors when piping yaourt through sort

Can sort preserve piped in colors? I'm trying to modify yaourt -Qu | sort so I get color output. Tried googling this but I couldn't find a general way nor a special way to do this for sort.
1
vote
2answers
558 views

How can I list LS_COLORS in colour?

I recall that eval "dircolors -b" used to display the colours that LS_COLORS was using, based on the file types or extensions. It was not simply the colour values that were displayed but the colours ...
1
vote
1answer
75 views

zsh colored prompt

this is my PROMPT PROMPT='%{$fg[green]%}%n%{$reset_color%}@%{$fg[white]%}%m%{$reset_color%}:%{$fg[yellow]%}%~%{$reset_color%} $(git_super_status) %{$fg[white]%}\$%{$reset_color%}' Yes, the new line ...
2
votes
3answers
54 views

Is there some built-in (bash/gentoo) function to provide well-readable output to the user?

I am using the following simple function to provide some well readable output to the user. Now I am wondering if there is some kind of (gentoo-/bash-) built-in function to accomplish this task, as ...
13
votes
1answer
240 views

What is the name of this terminal window graphical trick, which shows accented edges around highlighted text?

I've noticed a few screenshots of terminal windows online which show thin highlighted edges around status bars or highlighted lines. In the following example, note the light grey edging around lines ...
7
votes
4answers
3k views

vimdiff disable/enable color coding

Is there any way to quickly disable/enable color coding in vimdiff ? The problem is, I have colored text in vim and the text is invisible is the text-color is Red, and the vimdiff too tries to put a ...
2
votes
1answer
1k views

LS_COLORS settings for specific types of files

I'm trying to set up my color scheme for ls, and I'm having trouble finding information about exactly what parameters I have to work with, or where those come from. And especially setting colors for ...
15
votes
3answers
4k views

What color codes can I use in my PS1 prompt?

I used several colors in my PS1 prompt such as \033]01;31\] # pink \033]00m\] # white \033]01;36\] # bold green \033]02;36\] # green \033]01;34\] # blue \033]01;33\] # bold yellow Where can I ...
0
votes
1answer
33 views

Video-inverting my bash prompt

This is my prompt, as specified in ~/.bashrc: export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ " ...that yields something like: I ...
49
votes
4answers
21k views

How to colorize output of git?

Is there a way to color output for git (or any command)? Consider: baller@Laptop:~/rails/spunky-monkey$ git status # On branch new-message-types # Changes not staged for commit: # (use "git add ...
6
votes
4answers
6k views

How to turn off color with `ls`?

It is normally nice to have color output from ls, grep, etc. But when you don't want it, is there a switch that can turn it off? ls -G turns it on (with BSD-derived versions of ls) if it's not the ...
2
votes
2answers
93 views

Man page highlight color

To colorize my man pages, I put this code from archlinux.org into .bashrc: man() { env LESS_TERMCAP_mb=$'\E[01;31m' \ LESS_TERMCAP_md=$'\E[01;38;5;74m' \ LESS_TERMCAP_me=$'\E[0m' \ ...
1
vote
0answers
27 views

How can I get red letters with tput when I seem to get yellow?

I was using #!/bin/sh if [ $TERM=screen ] then pass_color=' \033[01;32m' fail_color=' \033[01;31m' fi echo "$pass_color green $fail_color red" as in but I was advised to use tput instead, so ...
1
vote
0answers
36 views

grc: Highlight capture groups only?

Recently I came across grc and I find it really simple. However, I would like to highlight some chunks of regex-matched text. For example, svn status properties conflict highlight I hoped to work: ...