Created
December 22, 2009 23:02
-
-
Save dchest/262152 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for Mercurial | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export PATH=$HOME/Projects/Scripts:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/bin/checker:/Developer/usr/bin:$PATH | |
source /usr/local/git/contrib/completion/git-completion.bash | |
if [ -f ~/.bashrc ]; then source ~/.bashrc; fi | |
alias la="ls -a" | |
alias ll="ls -l" | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
# #hg id -bn 2> /dev/null | sed -e 's/\(.*\) \(.*\)/(\2:\1)/' | |
} | |
# Set the prompt. | |
CODE_RED=$'\[\033[0;31m\]' | |
CODE_GREEN=$'\[\033[0;32m\]' | |
CODE_YELL=$'\[\033[0;33m\]' | |
CODE_BLUE=$'\[\033[0;34m\]' | |
CODE_NORM=$'\[\033[m\]' | |
CODE_GRAY=$'\[\033[1;30m\]' | |
PRUSER="\u" | |
PRTERM=":\l " | |
PREXIT="${CODE_YELL}\$EXITCODE${CODE_NORM}" | |
PRPROMPT="$" | |
if [ "$EUID" = "0" ]; then | |
PRUSER="${CODE_RED}\u${CODE_NORM}" | |
PRPROMPT="${CODE_RED}#${CODE_NORM}"; | |
fi | |
TITLEBAR="\[\033]0;\w\007\]" | |
PSTRING=$PREXIT$TITLEBAR${CODE_GREEN}$PRPROMPT${CODE_NORM} | |
#touch ~ | |
#s=$(printf "%*s" $COLUMNS); | |
#dashes=$(echo "${s// /-}\n"); | |
PS1="${CODE_GRAY}\w${CODE_YELL}\$(parse_git_branch) ${CODE_NORM}${TITLEBAR}${PSTRING} " | |
#PS1="${CODE_GRAY}\w${CODE_YELL} ${CODE_NORM}${TITLEBAR}${PSTRING} " | |
export PS1 | |
export CLICOLOR=1 | |
export EDITOR=/usr/bin/emacs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment