Enable "locate" command in Mac OS
Install GDB on Mac OS

Configure git bash prompt on Mac OS Lion

Author posted @ 2013年9月29日 09:59 in Mac OS with tags Git mac os , 3067 阅读

Create a ~/.bash_profile and enable colors using:

export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$"
export CLICOLOR=1
# light theme, white background
export LSCOLORS=ExFxBxDxCxegedabagacad

alias ls='ls -GFh'

In the ~/ folder, create subfolder .bash and drop gitprompt.sh and gitstatus.py files there (bash.zip)

In the ~/.bash_profile file, add ``source ~/.bash/gitprompt.s'' so the file becomes:

export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$"
export CLICOLOR=1
# light theme, white background
export LSCOLORS=ExFxBxDxCxegedabagacad

alias ls='ls -GFh'

#enable git bash prompt
source ~/.bash/gitprompt.sh

Restart terminal, and see the new look :

References

  1. http://osxdaily.com/2013/02/05/improve-terminal-appearance-mac-os-x/
  2. http://jimmylarkin.net/post/2013/04/18/The-ultimate-git-bash-prompt.aspx

 


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter