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

learn more… | top users | synonyms (1)

3
votes
1answer
44 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 ...
24
votes
3answers
28k views

CLICOLOR and LS_COLORS in bash

I have the following setup in .bashrc for coloring of listings. export CLICOLOR=1 export ...
1
vote
1answer
756 views

Terminal colors putty raspbian

I'm connecting to my Raspberry Pi from my Windows Machine using putty. I already adjusted the colors for bold blue in putty to be more readable (using this guide). But I still have problems with the ...
2
votes
5answers
476 views

ls | grep works doesn't work with ls --color

I'm trying to list all hidden dirs with the following command ls -lhAF1 | grep -E '^d.*[0-9]{2}:[0-9]{2} \.' which works perfectly fine Explanation for Regex: I'm trying to get all rows that ...
1
vote
2answers
27 views

stuff in quotes are hidden in the compilation error message for gcc?

this happens with both g++ and gcc as whenever I tried gcc file_name and the above happens.
0
votes
1answer
20 views

man: hide help message

I have set high contrast color for "search results" in man: export LESS_TERMCAP_so=$(tput setaf 1; tput setab 3) so that my search results are highlighted and easy to find. Unfortunately, this ...
2
votes
4answers
583 views

How to change color of a character while tailing and tr

I regularly use this command line but I would like to change the color of the "|" to green in the output. Does anyone know how I can accomplish this? tail -f file.log | tr '\001' '|' | grep TEST
1
vote
1answer
3k views

Terminal colors for Vim Airline and Tmux Tmuxline

When using Vim on its own with Vundle and Airline the theme appears normally: When I have loaded it up in Tmuxline, the theme uses different colors and even Vim looks different: Here's my Tmux ...
0
votes
1answer
32 views

colored bash does not work as root user

I have noticed that when I ssh to a server and then su to the root user, I do not get color in bash. In this specific case when I say "do not get color in bash" I am talking about editing files with ...
0
votes
1answer
37 views

Using hex colors in Ranger file manager

I would like to change the colors in a ranger colorscheme to some custom hex colors I defined. However, in the python file the colors are set by their names, like "blue" or "red". I tried to swap them ...
2
votes
1answer
61 views

256 colors in console (tty)

Suppose, I have a system without X server. I can only log in from the console. It seems, by default linux console supports only 8 colors: # tput colors 8 Is it possible to use 256 colors in the ...
6
votes
1answer
1k 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 ...
8
votes
2answers
1k views

Customizing bash shell: Bold/color the command

There are a number of tutorials/posts online (e.g. http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/) about how to customize your prompt in bash by ...
1
vote
0answers
12 views

Can I set a text color for the prompt or text I type to to be different from text generated. using bash konsole [duplicate]

when iuse the konsole for a period of time I sometimes have to scrollup to remind myself what has been going on but most of the text is green on black, warnings are purple and error messages are red. ...
11
votes
3answers
3k views

tmux copy mode search highlight

Is there any way to highlight the searched term in tmux copy mode? Below is my tmux config: # remap prefix to Control + a set -g prefix C-a unbind C-b bind C-a send-prefix bind a send-prefix # ...
0
votes
0answers
15 views

gray highlighting is gone

Gray text highlighting no longer works on my Debian/stretch system. Neither in Emacs for indicating the selected region, nor here in the browser editor for text within backticks. Which system level ...
2
votes
1answer
128 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: ...
2
votes
1answer
34 views

Clear to end of line uses the wrong background color in screen

In ZSH prompt expansion, the command %E is supposed to "Clear to end of line." This works. We see it in the grey bar going all the way across. However, if I call "screen", the %E stops working: ...
3
votes
1answer
46 views

Clear to end of line uses the wrong background color in tmux

In ZSH prompt expansion, the command %E is supposed to "Clear to end of line." This works: However, it does not work in tmux: The issue seems to be with BCE (Background Color Erase). In screen, I ...
2
votes
2answers
44 views

Issue with column command and color escape codes

I'm colorizing the header of a table formatted with column -ts $'\t' Works well without color codes, but when I add color codes to the first line column doesn't properly align the output. Without ...
9
votes
4answers
4k views

“Friendly” terminal color names in shell scripts?

I'm aware of libraries in languages such as Ruby and Javascript to make colorizing your terminal scripts easier by using color names like "red". But is there something like this for shell scripts in ...
3
votes
1answer
49 views

ls & dircolors - differentiate between symlink to directory and symlink to regular file

Is it possible to have the colors for symlinks-to-directories be colored differently than other symlinks? I know I can do: Link target to get the symlinks to take the color settings of their ...
2
votes
1answer
30 views

tools for coloring command line output of “dict”?

is there an existing solution somewhere to color the output of dict to improve its readability? I know i could manually color the output using tput, but i hope for a better solution. (i don't want ...
3
votes
1answer
25 views

Can I/how to specify colors in hex or RGB in nano syntax highlight config?

I enabled syntax highlight in nano (PHP), but not happy with the default, I would like for example to have the comments displayed in very light grey. However, the documentation I found seems to ...
29
votes
6answers
12k views

How to check if bash can print colors

I want to know if there's any way to check if my program can output terminal output using colors or not. Running commands like less and looking at the output from a program that outputs using ...
1
vote
0answers
25 views

change ls color on OpenWrt

I am not able to change the color of dir entries for ls command (dark blu is a very annoying color to read) on my OpenWrt device. I've added the line LS_COLORS=$LS_COLORS:'di=0;37:' ; export ...
4
votes
1answer
41 views

Turn off color in bash for logs

I am running Ansible on multiple machines and redirecting the output to a file, say log-$(date), which is mailed to me every day. The output file has multiple text colors, how to turn them off? ...
11
votes
2answers
3k views

Using sed to color the output from a command on solaris

I have a ksh script that must work on both linux and solaris. I'm trying to color the output of specific commands. It works on linux (specifically RHEL6), but not on solaris (SunOS 5.10). Command ...
139
votes
17answers
72k 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 ...
3
votes
5answers
61 views

Bash - Store Color Codes in Variable

How do I store colored text in a variable and print it with color later? I never see the answer to this question in 100 searches it's all about PS1 prompts, or inline printf's or using data from ls ...
1
vote
0answers
19 views

Make xgamma change permanent

I've recently installed Debian Jessie with Gnome3 on my laptop, and the default gamma settings of the screen are quite off. I corrected them using xgamma, but the changes this command makes are not ...
0
votes
4answers
72 views

Colorize filenames based on status for git diff --name-status

I often use git diff --name-status BRANCH_NAME to get the list of modified files. Is it possible to colorize the output of that command similar to the output of git status - green for added files, ...
7
votes
7answers
6k views

How to create a testcolor.sh like the following screenshot?

I found this image on the internet, but don't know how was it made, Can anyone provide a sample on that? I just would like to have a color table as well.
7
votes
6answers
3k 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 ...
6
votes
2answers
212 views

How to display control characters (^C, ^D, ^[, …) differently in the shell

When you type control characters in the shell they get displayed using what is called "caret notation". Escape for example gets written as ^[ in caret notation. I like to customize my bash shell to ...
0
votes
1answer
30 views

Disable annoying comment highlighting in emacs [closed]

I have started programming scheme, and I noticed the scheme minor mode highlights comments in the most obnoxious way possible when using solarized dark (color-theme-solarized). This also occurs on ...
1
vote
1answer
40 views

Busybox pager with color capability?

I asked on Superuser about colors for git log in MobaXterm (on Windows), but it turned out that the problem wasn't MobaXterm—it's the lack of a -R flag in busybox's less. It would help my workflow ...
2
votes
3answers
1k views

Color scheme is lost on shell change

My default login shell is ksh which shows my default color scheme which I set via putty. But when I change my shell to bash my color scheme is lost. Is there a way to retain the color scheme? EDIT: ...
1
vote
0answers
39 views

How can I use color output in a tmux run-shell command?

I've bound a key to run a script with tmux's run-shell command, but I can't find any way to use color output. normal ansi codes do not work, e.g. echo -e "\e[32mblah blah\e[0m" tmux formatting does ...
3
votes
0answers
65 views

Small script for updating GNOME Terminal 3.14.2 colours

Background With previous GNOME Terminal releases updating the colour scheme was a breeze. Just 5 lines of code were enough to do the trick. gconftool-2 -s -t bool ...
0
votes
0answers
25 views

How can binary names in command prompt be colored

I recently saw in a presentation that the typed in commands that matched something in /bin /sbin /... were colored green. It looked nice and felt more structured. How can this be achieved with ...
4
votes
1answer
1k views

Pass colors from ls through pipe to awk 'print' statement

This is a follow-up to my question from yesterday, Show sum of file sizes in directory listing. Thanks to Zero Piraeus and a point in the right direction by Mauritz Hansen, I now have function ...
3
votes
2answers
77 views

How to get a human-readable (e.g. RGB) value from `\e]11;?\a`?

The string \e]11;?\a presumably yields the current terminal's background color, but I have not found a way to use this information to get the color in a human-readable (e.g. RGB) format. I did try ...
0
votes
1answer
18 views

GIMP: Reinterpret color channels as HSV

Suppose I export a 3-dimensional array as a P6 .pbm file, with the implicit assumption that the values are to be interpreted in the HSV colorspace, rather than the RGB colorspace. When I open the ...
0
votes
2answers
78 views

Fix LS Colors for directories with 777 permission? [duplicate]

When I run ls on a folder with directories that have a 777 permission, the ls colors are purple text with a green background, which is unreadable: What can I do to make this more pleasant to look ...
29
votes
2answers
21k views

tmux bottom bar color change

I recently started to use tmux and like it much, but its green bottom bar is a bit distracting, is there a way to change its color? or a way to hide it?
21
votes
1answer
509 views

Is there any manual page for colored shell output?

You know, that colorized output made by special char sequences, for example: echo -e "\e[34m Hello\n \e[0m" This will produce word "Hello" colored in blue. To do this I had to search on the web, ...
0
votes
1answer
56 views

problem with 256-bit color codes in bash prompt

Here is my bash prompt; I'm using ANSI escape sequences reset="\033[0m"; blue="\033[38;5;20m"; cyan="\033[38;5;38m"; green="\033[38;5;35m"; yellow="\033[38;5;227m"; white="\033[38;5;250m"; # Set ...
12
votes
2answers
311 views

How can I make commands appear bold in zsh?

I have set up my bash shell so that any commands I type appear in bold and the commands' output is shown in normal weight: I did this by adding \e[01m at the end of my PS1 variable to turn on bold, ...
1
vote
2answers
2k views

How to change the output color of the ls command in terminal in OS X and iTerm2?

I know that a similar question has been asked in: How to colorize output of ls ? although I didn't really understand the answer and couldn't really make it work. However, I have tried something ...