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

learn more… | top users | synonyms (1)

2
votes
3answers
35 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 ...
10
votes
1answer
141 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 ...
4
votes
1answer
556 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 ...
5
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 ...
6
votes
1answer
59 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
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 ...
8
votes
3answers
1k 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
24 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 ...
39
votes
4answers
17k 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 ...
3
votes
4answers
3k 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 ...
79
votes
8answers
92k 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-lin, because color makes the output more useful and intuitive. What are some good ...
2
votes
2answers
31 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
24 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 ...
4
votes
1answer
386 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 ...
1
vote
0answers
22 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
50 views

Printing filled shapes in terminal

I'd like to print some shapes filled with the current color or a selected one (e.g. \e[31m) My aim is to print a filled circle (letter o) on the screen but the background will stay as it is. finally ...
2
votes
1answer
61 views

Terminator custom colors overriden by KDE

I've been working on Solarized theme in Terminator (http://gnometerminator.blogspot.fr/p/introduction.html) for about a year on Gnome and have been very satisfied. Yesterday I switched to KDE and the ...
2
votes
2answers
76 views

Format terminal output to show apt-get upgrade errors in RED

I have a very simple bash script written for my Kali Linux distro so I don't have to run apt-get update, apt-get upgrade, apt-get dist-upgrade, apt-get autoclean, and apt-get autoremove every time I ...
0
votes
0answers
12 views

acoc: availability, similar projects and problems?

I am trying to work on a Linux project out of Linux From Scratch. The outcome is a Linux with dull command line and console. I tried to bring color to terminal and I hit some bits and pieces like ...
0
votes
0answers
48 views

Powerline bash prompt not colorized in tmux

The bash/zsh commandline prompt is not displaying colors in tmux, even though I managed to get the powerline itself working (with colors). The prompt works fine in pure bash/zsh. I am getting the ...
1
vote
0answers
26 views

How to force custom color scheme when using Inverted Colors in Evince?

As pointed out in Software to read PDFs with inverted colors (Windows), instead of having a very white on very black color scheme (which induces a very nasty contrast) it is often preferable to use a ...
6
votes
4answers
2k views

Colored FIND output?

Is it possible to get colored output from the find command? That is, in the path of each found item, directories are blue, executable scripts are green, et cetera? I'm using version 4.4.2 of GNU ...
4
votes
3answers
870 views

Prevent watch breaking colors

I'm altering scripts at work that monitor log files to single out certain items and colorize them. The final output is a list of 6-digit numbers in several columns. I've been able to add a ~ to the ...
2
votes
1answer
52 views

Red and blue are switched in xfce

I have a BeagleBone Black, wich is connected to a TV via HDMI. When I boot up the BeagleBone Black using a minimal Ubuntu image, I can see Tux greeting me in all his three-color glory, yellow feet and ...
3
votes
0answers
81 views

How to change background color of a pane in tmux?

I would like to change the background color of the inactive panes in tmux to better distinguish between the active pane and inactive panes. Something just a few shades different than the default. How ...
17
votes
2answers
987 views

Are the terminal color escape sequences defined anywhere for bash?

I've used every so often colors in Bash scripting (mostly on CentOS), but to make their usage more convinient I end up redefining variables to color values: local GRAY="\[\033[1;30m\]" local ...
0
votes
1answer
129 views

Using Grep Colour to look in a file, and output with a coloured answer in amongst the file contents

I am currently in the process of writing a program in raspberry pi that will allow me to look inside files and have what I entered displayed in colour I think I need to do something to do with ...
4
votes
2answers
57 views

Sorting strings with ANSI escape codes

I am trying to print a sorted list of all zsh options, with set options colored green and unset options colored red. I cannot get sort to work properly with on the colored lines though.The below ...
2
votes
2answers
85 views

Non-printing escape sequence: when?

Recently, I have been playing around a lot with color in the terminal and, therefore, with escape sequences, too. I've read the relevant parts of the Bash manpage along with numerous helpful pages on ...
19
votes
5answers
9k 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
1answer
37 views

colors not being expanded in zsh print -P

I have a zsh prompt script that uses print -P to perform prompt expansion. The script does not work properly on a particular remote system that I ssh into. The color directives in the prompt print ...
5
votes
1answer
121 views

How to colourise hidden files in `ls` file listings?

LS_COLORS environmental variable lets you decide on colours for different file types for ls command, such as, directories, regular files, links etc. I suppose that dot files are considered a variation ...
30
votes
6answers
8k views

Program that passes STDIN to STDOUT with color codes stripped?

I have a command that produces output in color, and I would like to pipe it into a file with the color codes stripped out. Is there a command that works like cat except that it strips color codes? I ...
6
votes
5answers
3k 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.
8
votes
1answer
550 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
7
votes
3answers
629 views

Git pager is less, but what is causing the output coloring?

less itself isn't capable of doing syntax highlighting, according to this thread. However, git diff nicely shows colored output in less, its default pager. When I redirect the output of git diff ...
1
vote
0answers
639 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 ...
65
votes
3answers
17k 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.
10
votes
3answers
10k 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 ...
1
vote
2answers
62 views

Which part of this bash PS1 config determine the color?

I got my git branch color set by this tutorial:http://www.bramschoenmakers.nl/en/node/624 But recenlty I've reverted my terminal background color, and the yellow branch name is nearly invisible under ...
5
votes
2answers
152 views

How do I preserve coloured output when piping to `less -R`?

$ ffmpeg -v debug ... Coloured output. $ ffmpeg -v debug ... |& less -R Dull output. How do I make the output coloured while piping it to something?
1
vote
1answer
107 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 ...
0
votes
0answers
13 views

Determin if the currnet terminal has a dark or light theme [duplicate]

I have several (Bash) scripts that uses ASCII color codes. They look good on my dark themed terminal, however on my colleagues light themed terminal the colors I selected don't look that good. Is ...
18
votes
2answers
1k views

Coloring different sources for tail

I'm watching different logs by tail -q -f /var/log/syslog -f /var/log/fail2ban.log -f /var/log/nginx/error.log How can I have the output of each log colored differently?
17
votes
6answers
914 views

How can I highlight matches using GNU grep?

I have seen on some Linux, that grep is configured to highlight the match, and print the matching file. How can I configure grep to highlight matches?
1
vote
1answer
299 views

Video colors reversed (negative) in Ubuntu 12.04 LTS

What's the fix for negative colors in videos (Ubuntu 12.04 LTS)? Pictures or thumbnails are not effected, only videos. It does not seem to be a browser problem as videos viewed offline exhibit the ...
1
vote
1answer
69 views

Less command change color of “~” and “(END)”?

How do I change the color of the "~" characters that go along the edge of a Less command output. And how to change the color "(END)" at the bottom?
4
votes
1answer
53 views

Make `most` pager properly handle colours from standard‑input

How do I make the most pager properly display colours in text received from standard‑input? Note: I'm not sure whether or not it's a bug in most. I am not encountering the same issue with less and ...
7
votes
2answers
3k views

16 Colors in ZShell

I only seem to be able to call 8 colors in my zshell prompt. Example: PROMPT="[%n@%{$fg[magenta]%}%m%{$reset_color%} %.] %# " Works fine. However, ...
2
votes
1answer
100 views

Defining color codes in rxvt-unicode

Using some of node.js tools like mocha in my urxvt terminal, I have some problems with coloured output. Some of the text that are using colour code 90 as you can see here will be disappeared in ...