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

learn more… | top users | synonyms (1)

1
vote
1answer
28 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
37 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 ...
11
votes
1answer
163 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 ...
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 ...
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 ...
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 ...
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
62 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
27 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 ...
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 ...
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 ...
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 ...
0
votes
1answer
38 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 ...
1
vote
0answers
644 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 ...
7
votes
3answers
630 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
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
110 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?
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 ...
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 ...
1
vote
1answer
71 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?
0
votes
1answer
75 views

Color of emacs margins

With the following in my .emacs I get narrow margins in text-mode buffers: (defun my-set-margins () "Set margins in current buffer." (setq left-margin-width 30) (setq right-margin-width 30)) ...
3
votes
1answer
65 views

Fine-tune LS_COLORS for directory suffixes?

I’m fine customizing most settings in LS_COLORS. I don’t need help customizing the colors for different file suffixes. What I would like to do is configure special colors for certain directories, ...
2
votes
0answers
101 views

Change color balance on Intel Graphics

My laptop has some screen or cable problem, because of which the screen is all pink colour. In Windows I use my Graphic Card configuration software to change the screen colours mixing colour channels ...
2
votes
1answer
271 views

vim: Use different colorscheme when connected over SSH

On my desktop I use the hbrid color scheme in vim, with the preferred colors set for my consoles 16-color palette (as described in the README). However, on my laptop, I use the solarized color ...
1
vote
1answer
71 views

tmux hightlight colour setting

In tmux, the default highlight setting is a yellow background -- at least on my version and machine. This is when using the mouse on X11 but is the same with the console selection. I cannot find the ...
0
votes
1answer
2k views

Change colors for the Pantheon terminal emulator

I am using Elementary OS (based on Ubuntu 12.04) and I would like to change the coloring scheme for Pantheon Terminal window. Here's what I've tried: Elementary Tweaks Dconf Editor shell commands ...
7
votes
3answers
496 views

How to permanently change both STDOUT and STDERR color to grey?

This question is similar to Can I configure my shell to print STDERR and STDOUT in different colors? But I am looking for a solution that will allow me to change both STDOUT and STDERR to ONE color. ...
2
votes
1answer
71 views

Strip color on OS X with BSD sed (or any other tool)

I'm on OS X, which has a BSD version of sed (which I'm guessing is inferior to a GNU version on Linux), and all the techniques for removing color on commandlinefu.com did not work. I tried replacing ...
7
votes
1answer
401 views

How do I use colors in the MOTD?

I edited the default /etc/update-motd.d/00-header, adding some color to make it easier to read: printf "Welcome to \e[1;34m%s\e[0m \e[2m(%s %s %s)\e[0m\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" ...
4
votes
3answers
390 views

cascaded grep matches color code as pattern

I am piping output of one grep comand into another grep. The first grep is using --color=always, so that the first match is colored. In practice, that means that the match is enclosed between two ...
0
votes
1answer
54 views

Location of colorscheme-files in Kate

In Kate one can export file Fortran.katehlcolor which store the information about color in syntax-highlighting. The syntax-highlighting files itself are located in ~/.kde/share/apps/katepart/syntax ...
1
vote
1answer
551 views

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

I know that a similar question has been as in: How to colorize output of ls ? Though, I didn't really understand the answer and couldn't really make it work. However, I have tried something ...
2
votes
2answers
350 views

256 Colors in xterm and tmux [in FreeBSD 10]

So these past few days I am working to make Xterm and tmux show all the 256 colors available in them by default. I reach these conclusions: for tmux to show 256 colors you have to make xterm to ...
0
votes
1answer
81 views

How to get the same ls with colors working on both OSX and Ubuntu?

When I want color in Ubuntu I do alias ls='ls --color=always' but on OSX this gives an error ls: illegal option -- - and I need to do alias ls ='ls -G' How can I create an alias with the same ...
1
vote
3answers
71 views

colourize the first part of each line

I have some chat logs like: (15:12:56) rubo77: mist migration (15:05:22) hans: ist hugo da? (15:36:13) rubo77: test (13:30:15) rubo77: what are the access data? (15:06:38) someone@jabber.ccc.de: user ...
4
votes
2answers
2k views

How to change font colors in terminal?

I know how to change the font color via preferences, but it changes the color of ALL text, as in below:     What I'm going for is something more like this:     Any ...
10
votes
2answers
559 views

Filter output of command by color

I am running a utility that doesn't offer a way to filter its output. Nothing in the text of the output indicates that a particular function failed but it does show in red. The output is so long that ...
5
votes
2answers
116 views

How would I add a prefix to input I receive from a pipe via awk and color the prefix conditionally?

Is there a way to add a prefix to lines received (and filtered) via awk - yes I know that's possible so far - and then conditionally (e.g. based on the existence of the $PS1 variable of the ...