39

I want it to have all the colors for syntax folders, etc... How can I do that?

36

My terminal colors

terminal color examples

how to do it

download theme

from here: http://media.tannern.com/tanner.terminal

import into Terminal

After installing SIMBL and the correct terminalcolors you can import my terminal theme from the Terminal Preferences window.

where to find the import option

other tweaks

Adding this to the file ~/.profile will make ls color it's output by default.

# Make ls use colors
export CLICOLOR=1
alias ls='ls -Fa'

Adding this will define colors as variables to make a prompt easier to edit.

# define colors
C_DEFAULT="\[\033[m\]"
C_WHITE="\[\033[1m\]"
C_BLACK="\[\033[30m\]"
C_RED="\[\033[31m\]"
C_GREEN="\[\033[32m\]"
C_YELLOW="\[\033[33m\]"
C_BLUE="\[\033[34m\]"
C_PURPLE="\[\033[35m\]"
C_CYAN="\[\033[36m\]"
C_LIGHTGRAY="\[\033[37m\]"
C_DARKGRAY="\[\033[1;30m\]"
C_LIGHTRED="\[\033[1;31m\]"
C_LIGHTGREEN="\[\033[1;32m\]"
C_LIGHTYELLOW="\[\033[1;33m\]"
C_LIGHTBLUE="\[\033[1;34m\]"
C_LIGHTPURPLE="\[\033[1;35m\]"
C_LIGHTCYAN="\[\033[1;36m\]"
C_BG_BLACK="\[\033[40m\]"
C_BG_RED="\[\033[41m\]"
C_BG_GREEN="\[\033[42m\]"
C_BG_YELLOW="\[\033[43m\]"
C_BG_BLUE="\[\033[44m\]"
C_BG_PURPLE="\[\033[45m\]"
C_BG_CYAN="\[\033[46m\]"
C_BG_LIGHTGRAY="\[\033[47m\]"

Adding this will give you a multi-line colored prompt.

# set your prompt
export PS1="\n$C_LIGHTGREEN\u$C_DARKGRAY@$C_BLUE\h $C_DARKGRAY: $C_LIGHTYELLOW\w\n$C_DARKGRAY\$$C_DEFAULT "

For a list of escape sequences to use in prompts check this article

  • The link supplied in your answer is gone. – Eric Sebasta Jul 25 '14 at 14:23
  • 1
    I've since stopped using Apple's Terminal application in favor of iTerm2 ( iterm2.com ) I prefer it's split windows over tabs and it does not need any hacks to support correct coloring (although I haven't used Apple's Terminal in some time and it may no longer need the hack listed above) – rennat Jul 28 '14 at 16:29
  • Can I use this theme for gnome shell? If yes how can I do? Thanks a lot. – michele Jun 13 '15 at 9:38
  • @rennat The problem with posting links to blog posts is that they go away and are unreliable, please update this post with the instructions from your blog – Stevie G Sep 19 '15 at 7:32
  • @surfer190 I removed the link to that guys blog post since it's no longer necessary to patch terminal for proper color support. – rennat Sep 25 '15 at 14:50
19

geekology.co.za has an informative blog post on how to do this, "Enabling Terminals directory and file color highlighting in Mac OS X". In case it gets moved or deleted, the basics are:

Add to your .bashrc or .profile:

export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad

Save the file. Open a new terminal and use

ls
ls -l
ls -la
ls -lah

The rest of the article has info on what the colors do and how to change them (the letters you assign to LSCOLORS is what controls what colors you see).

10

As of Mac OS X Lion 10.7, Terminal allows you to customize the sixteen ANSI colors and also supports the 256-color palette.

So, installing SIMBL or other extensions to get more colors is no longer necessary.

0

People may want to check out zsh + prezto. There's a nice guide here. zsh is already installed in OSX. Prezto just adds stuff to your shell. Activate the syntax-highlighting module, and go to town :)

  • Looks like the link to the guide is broken. Giving a 404 :( – Eric Seastrand Sep 21 '16 at 20:11
  • @Eric Thanks, I fixed the link. Also see the follow-up article here – Valorum Jan 24 '17 at 21:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .