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

learn more… | top users | synonyms (1)

1
vote
0answers
18 views

How to fix Eclipse and Caja color in Linux Mint Mate?

I started using Eclipse IDE with Linux Mint. I have darkened Ambiance theme and Eclipse looks extremely ugly and painful to eyes. And it seems I cannot change that white color of file browser ...
0
votes
2answers
21 views

Changing the color of only one directory in ls

Is there a way to change the color of only one of the listed directories in the ls command? I have researched the LS_COLORS variable, but this doesn't solve the issue because you cannot list specific ...
0
votes
1answer
17 views

Highlight Vim escape characters e.g. \n

I'm using the Jellybeans vim colorscheme but it doesn't highlight any escape characters. For example if I'm using C++ and have the following... std::string word = "hello\n"; ... the whole string ...
2
votes
2answers
103 views

sed - find correct color sequence for ANSI extended 256 colors

I am currently using the following command to use the standard ANSI colors with the tail command: tail -f syslogfile | sed -e 's/\(.*MAJOR.*\)/\o033[93m\1\o033[39m/' This is bright yellow however I ...
1
vote
1answer
20 views

Lynx colors not applied

I have a lynx configuration file in ~/.lynx.cfg. To make lynx use it, I have in my environment $LYNX_CFG pointing at that file. Content: # Default COLOR:0:black:white # Hyperlinks COLOR:1:black:...
1
vote
1answer
52 views

Vim color scheme not being applied

I am installing this theme using these instructions. $ vim --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 08 2016 11:38:28) Included patches: 1-1689 Here is my ~/.vim/colors: xxx@xxx:~/...
0
votes
1answer
39 views

How to change the color of boot logs in Debian?

OS: Debian Jessie (8) How can I change the color of all the logs and text during the initial boot (and also the final shutdown) to black? (including the login user/password prompt) !? My goal is to ...
3
votes
4answers
129 views

Where should I save color codes for the PS1 command line / terminal? [closed]

This question is about best practices. I know logging in over secure shell or switching users su, and su -l have different effects. Also, in the event you make a typo in the configuration, you still ...
2
votes
0answers
39 views

Portable color codes with printf? [duplicate]

There is a color codes script on GitHub suitable for sourcing, which I am modifying for my own purposes. Background I have an odd mix of environments to work in, from a Mac OS terminal, to various ...
14
votes
2answers
828 views

Colored output?

When I execute a command from a terminal that prints coloured output (such as ls or gcc), the coloured output is printed. From my understanding, the process is actually outputting ANSI escape codes, ...
0
votes
1answer
28 views

how to color specific strings in standard output and standard error [duplicate]

How do you color specific strings in standard output and standard error? For example: gpg --verify Outputs either a good signature or a bad signature string. How can I color the good one, green; ...
2
votes
1answer
30 views

In the SGR number 38 and 48, where do the 2 and 5 numbers come from?

In multi-color-compatible terminals, one can set a color from a 256-color palette by using ESC[38;5;Nm, and any RGB color using ESC[38;2;R;G;Bm. I've been wondering though, where do the "2" and "5" ...
1
vote
3answers
42 views

Unable to use a escape sequences in a variable in a sed command

I'm using sed to highlight a column in the output of a ps command, and it works fine if I hard code the color code. However, the color needs to be dynamic, so I tried moving it to a variable, and ...
2
votes
1answer
45 views

Highlight nth column of ps output

I'm trying to find the best way to highlight a specific column of some output. Specifically, I'm trying to highlight the 9th column (which is %cpu of the command: ps -eo pid,ppid,time,user,tty,%cpu,%...
-1
votes
1answer
31 views

tmux not printing ANSI colors in status bar

I'm using Mac OSX Yosemite, and I use istats to get CPU temperatures: I wanted to put my CPU temperature in my tmux status bar, so I made my tmux config the following: As you can see, when I ran :...
0
votes
1answer
11 views

Display RGB database foreground/background combinations

I'm trying to adjust color in X. I seem to recall that there are a couple of utilities available to experiment with foreground/background combination while displaying all the colors. Anybody know ...
1
vote
2answers
45 views

Diff patch output saved to a file. How to see it syntax-colored?

I have a folder with subfolders that contains text files. Every now and then I run a script that makes a copy of that folder tree and then creates a new one with fresh info. After that, having the ...
1
vote
0answers
29 views

Paging with follow less +F and colorize with awk

I would like to paginate a file with follow, i.e. $less +F and also colorize the output on the screen. I want to use less because I can leave the follow mode, browse the file and then re-enter the ...
0
votes
0answers
19 views

grep, assigning colour per string match? [duplicate]

Is it possible to set the colour of a Grep result per search. I have searched and cannot find a definitive answer Am scanning through some large Error Logs and ideally looking for the output of ...
2
votes
1answer
44 views

Different vim colors and styles in Tmux and Gnome

I am using tmux, and recently found out that the same vim colorshemes inside and outside of tmux have different colors Left is tmux in gnome-terminal, right is plain gnome-terminal, gnome-terminal ...
1
vote
1answer
60 views

Terminal color usage does not stay

I was wondering if any of you knew why doesn't my terminal keep displaying stuff colored, after I use the command ls -l -a --color=always I would like it to stay colored, so when the next time I type ...
1
vote
2answers
35 views

How to color some strings in a file

I prepare a file Hello.txt as follows. 1253125213 213532135 23513125215 Then, I want to color each line blue except "2", and color the "2" red. At first, I wrote BLUE='\033[0;34m' RED='\033[0;31m'...
0
votes
0answers
18 views

Possibility to write some words in different color in log file [duplicate]

Is there a possibility to colorize words in a log file? I want to have the word ERROR in my logfile always in red, to see it more easily. I watch it with the tail function: tail -f -n 500 catalina....
1
vote
0answers
27 views

Do light color codes work across all distros and terminals? [duplicate]

I use \033[1;34m for light blue. I am using Debian and Putty and it works for me. However, I've heard that it may not work for all users (using different distros and terminals). Is that true? Do they ...
9
votes
3answers
639 views

Piping a command through a color filter

Does something like this exist in Unix? $ echo "this should show in red" | red $ echo "this should show in green" | green $ echo "this should show in blue" | blue Here I don't mean for literal ...
15
votes
2answers
566 views

How do I use grep while keeping the original text color? [duplicate]

For example, I have a output: Hello, this is the output. (let's say that for example hello is colored red, and the is colored green, and output is colored purple). Now, let's say that this is the ...
0
votes
2answers
46 views

How do I make the terminal background bright white?

I am using: setterm --foreground blue --background white --blink on The result is that the text is blue on bright white. However, the background around the text is grey. How can I make the entire ...
0
votes
2answers
43 views

How do I create a dark blue text on a bright white background in MOTD in Debian?

This is what I currently have. It displays black on bright white. However, I want to have blue (0;34m) on bright white. ^[[0;7;34;37;5mWelcome!^[[0m I used this website as a reference, but I did ...
2
votes
1answer
25 views

make ls gray out files that end with tilde (`~`) using `LS_COLOR`

Problem: I am trying to modify LS_COLORS to gray out all files ending with the tilde character. Question: Can anybody spot my mistake? Here is what I did: # write dircolors file: dircolors -p > ...
1
vote
1answer
47 views

set color of conky

I want to set the color of a line to a specific shade of yellow (but not just yellow). I set it like this: ${font LCDMono:bold:size=20}${color yellow}Uptime:$color $uptime Where all the line has ...
0
votes
0answers
16 views

colours specified in terminal emulator? [duplicate]

In terminal editors one can specify a set of colors - a theme - which should be used. In konsole and x-terminal-editor one can set up 16 colors, they seem not to be named, rather only numbered. ...
3
votes
1answer
62 views

Filtering the colored output of grep

I'm on OSX, but I suspect this doesn't make a big difference for this question. In my .bash_profile, I aliased grep to get color outputs by default: alias grep='grep --color=always' I commonly run ...
2
votes
1answer
24 views

Change color when changing directory

I have two folders called Documents and Downloads. In zsh, when I type cdSpaceDoTabc the color of Documents change from white to (hard to read) gray. How can I turn off this color change or control ...
1
vote
1answer
112 views

Why xfce4 terminal colors are so ugly? [closed]

Hello I have a big problem, I'm trying to install some nice color themes on fish and vim but it looks like that my xfce4-terminal has some ill looking internal colors. I installed gnome-terminal to ...
0
votes
0answers
43 views

Vim not loading color scheme file at all

I have exactly same two CentOS 6 boxes. Trying to install vim and enable color scheme file. Same thing, same vim versions used but the color scheme works in one machine and not in other. Here are ...
3
votes
1answer
127 views

Does “color” in TERM always mean I can use colors?

Should the following always indicate that I can use escape sequences and tput to colorize things? if [[ $TERM == *"color"* ]]; then true else false fi
2
votes
1answer
57 views

How to substitute one color code for another in terminal?

Can I make bash automatically substitute one color code for another? For example, whenever a program outputs text wrapped in color code for bold foreground, I would like bash to actually use code for ...
0
votes
1answer
32 views

xterm highlighting always white, not reverse

I'm running Debian on my desktop, laptop, and netbook. On my desktop and laptop, I am using Gnome desktop environment; whereas my netbook is using i3wm (installed after a text-only install initially). ...
1
vote
0answers
67 views

Terminal colors changing when opening a new tab

I'm running Ubuntu 14.04 (x64 desktop edition) and I have an issue in my terminal (bash) where my colors seem to get "saturated" and my line cursor changes to black when opening a new tab, the first ...
4
votes
3answers
642 views

tput setaf color table? How to determine color codes?

I am in the process of colorizing my terminal’s PS1. I am setting color variables using tput; for example, here’s purple: PURPLE=$(tput setaf 125) Question: How do I find the color codes (e.g. ...
4
votes
1answer
48 views

Use same colors in bash tab complete and ls [duplicate]

Bash is using a different color for tab completion than ls. For example, my ls command uses a red color for a broken symlinks (I'm using dircolors to configure it), but if I use ls Tab, the color is ...
35
votes
5answers
2k views

Syntax highlighting in the terminal

Lots of programming-oriented editors will colorize source code. Is there a command that will colorize source code for viewing in the terminal? I could open a file with emacs -nw (which opens in the ...
4
votes
2answers
431 views

Is it possible to use ANSI color escape codes in Bash here-documents?

I'm printing a message in a Bash script, and I want to colourise a portion of it; for example, #!/bin/bash normal='\e[0m' yellow='\e[33m' cat <<- EOF ${yellow}Warning:${normal} This script ...
0
votes
1answer
43 views

Vim color scheme not always working

I have changed my color scheme in vim by adding this line to .vimrc: colorscheme desert When I open .vimrc or .profile the text is colored, but when I do for example vim test.txt the text I enter is ...
1
vote
0answers
98 views

Adjusting colors for mutt's status line in multi-account setup

Question How can mutt be configured correctly so, no matter the number of accounts it handles, color settings can be adjusted per account along with the folder-hooks? Details In a mutt multi-...
1
vote
3answers
51 views

Does `less` or `more` support ansi escape `\x1b[2K` (erase_line)?

Basically I wanna animate my terminal but because the text is too long, I need a pager. Let's just say I wanna change my text colour periodically in less. Is it possible?
0
votes
1answer
75 views

Vim color scheme not being applied

I'm trying to use this color scheme: https://github.com/Konstruktionist/vim/blob/master/colors/Kafka.vim Here is my ~/.vim/colors: xxx@xxx:~/.vim/colors$ ls -l total 16 -rw-rw-r-- 1 xxx xxx 15245 ...
1
vote
2answers
198 views

Debian - How to change Terminal background colors

I am a Git Bash user who is now switching to Debian. Here was my Git Bash's look: Here is my look on Debian: My .bashrc file is completely EMPTY. I have nothing in there currently. I've been ...
0
votes
1answer
45 views

Putty doesn't have any colors, but only for one server

I'm using Putty to connect to 7 servers. The problem is that one of them doesn't have any colors, which makes it harder to distinguish folders from other files. Here's what I'm talking about. ...
3
votes
1answer
65 views

Change dir colour in bash output

Under Mac OSX, I am trying to change the dir colour when ls outputs in the bash shell. So I placed this line at the end of my .bashrc file and reloaded. LS_COLORS=$LS_COLORS:'di=0;32:' ; export ...