Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

share|improve this question
1  
    
(Link is broken to media.tannern.com/stackoverflow/Tanner%202.terminal) –  user21909 Apr 21 '12 at 11:53
add comment

3 Answers 3

up vote 19 down vote accepted

My terminal colors

terminal color examples

how to do it

setup terminalcolours

Follow this blog post's instructions to get proper color support in Terminal.

download theme

from here: http://media.tannern.com/stackoverflow/Tanner%202.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

share|improve this answer
add comment

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.

share|improve this answer
add comment

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).

share|improve this answer
1  
+1 for not simply linking to the answer and including the core of it here. –  Philip Regan Mar 8 '11 at 19:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.