Jump to content

Color in Terminal


Recommended Posts

I use a terminal program on my Mac called zoc by emtec and in comparison to all the other program terminals I have used, its by far the best all around program.  With mac I have tried iTerm2 (garbage and very feature less), MacTerm, 

In your home directory (so I just type cd and press enter which bring me there) I type vi .bash_profile and my bash profile looks like the one below which gives me color.  Its really about the PS1 command mainly.

# .bash_profile
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH
export {http,https,ftp}_proxy="http://NAO\dhosang:qMtzWRhSTZD8rNHm@10.43.196.154:80"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

parse_git_branch() {
     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# PS1 Base :x
# Origin [\u@\h \W]\$
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
LS_COLORS="di=4;33"

..

Link to post
Share on other sites
×
×
  • Create New...