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

learn more… | top users | synonyms (1)

4
votes
1answer
54 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
468 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
45 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
133 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
64 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
84 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
359 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
49 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
68 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 ...
2
votes
5answers
586 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
46 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
24 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 ...
0
votes
1answer
91 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 ...
2
votes
1answer
472 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 ...
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. ...
0
votes
0answers
25 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 ...
3
votes
1answer
85 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 ...
5
votes
2answers
154 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 ...
2
votes
1answer
62 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: ...
2
votes
1answer
84 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
41 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
48 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 ...
4
votes
1answer
70 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? ...
1
vote
0answers
56 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 ...
3
votes
5answers
129 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
48 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
1answer
45 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 ...
0
votes
1answer
107 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 ...
0
votes
4answers
126 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, ...
1
vote
0answers
57 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 ...
0
votes
0answers
28 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 ...
3
votes
2answers
114 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
2answers
406 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 ...
0
votes
1answer
27 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 ...
21
votes
1answer
571 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
148 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 ...
3
votes
0answers
90 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 /apps/gnome-terminal/profiles/...
13
votes
2answers
621 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, ...
6
votes
2answers
835 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 ...
3
votes
1answer
155 views

OS X: Can `ls` show broken symlinks?

When in Linux, I enjoy having \ls -l --color=auto show broken symlinks with red text for the name of the symlink and blinking text for the missing linkee. But in OS X, \ls -lG (the closest thing I ...
2
votes
0answers
257 views

How can I make my Zsh theme (“fade”) look good in urxvt?

I am using Arch Linux and as a newbie I don't have any preference for a terminal emulator yet. Since rxvt-unicode seems to be the most popular one, I thought I'd try that first. I'm configuring it ...
1
vote
2answers
265 views

Changing colors used by `ls` does not work in Emacs “Shell” mode

I followed http://unix.stackexchange.com/a/94508/674 to change the colors used by ls. This works in bash. When I open a buffer of "Shell" mode in Emacs (M-x shell), the change doesn't work. I wonder ...
0
votes
1answer
222 views

Eclipse Mars + Fedora 20 + KDE = black-on-black tooltips

So, I'm using a system with Fedora 20 installed, running a KDE 4.14.7 desktop. (I don't have root access so please no complaints about why I don't just upgrade my distro.) I have just installed ...
0
votes
1answer
43 views

FreeBSD 9.3 and OSX color tags

I am using nas4Free 9.3.2 and FreeBSD 9.3-RELEASE-p22. I noticed after using cp, that my moved files no longer had the color coded labels I had applied in OSX. Share mounted in AFP. To test this, I ...
1
vote
2answers
42 views

How can I color code a log file based on fail, warning and info messages?

How can I color code a log file based on fail, warning and info messages? So that if I see the log file in web browser, it gives me colorful log file.
0
votes
1answer
283 views

Can fbterm support 256 colors?

I have Arch without X and want to make my console solarized. I think I can't do that in tty, so I had installed fbterm and tried to play with fbtermrc, bashrc etc. $ tput colors 256 $ xterm-color-...
0
votes
1answer
144 views

Colorization of BASH script output with tput - how to select good colors? [closed]

I would like to colorize output of one long complex interactive BASH script to make it easier for the user to work with it. I have learned how to use tput, but my question is more matter of design: ...
4
votes
2answers
120 views

Tmux and dim-ed colours in Terminal.app on MacOS

The problem On my Mac (10.11) Tmux does not show dim-ed colours properly, and this causes annoyance. In the following picture, the commit author's name is supposed to be represented in dim white. ...
2
votes
2answers
570 views

Urxvt: change background color on the fly

Is there away to change the background color of a rxvt-unicode session on the fly? Like with Ctrl key? I have a bunch of Urxvt windows and I would like to color some dynamically to help me ...