Skip to content

Instantly share code, notes, and snippets.

@alastairparagas
Created August 23, 2015 19:34
Show Gist options
  • Select an option

  • Save alastairparagas/b3e648f9030690fd2de1 to your computer and use it in GitHub Desktop.

Select an option

Save alastairparagas/b3e648f9030690fd2de1 to your computer and use it in GitHub Desktop.
Bash Profile for my Mac OSX
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/'
}
# Source: kirsle.net/wizards/ps1.html
export PS1="\[$(tput setaf 2)\][\W]\[$(tput setaf 1)\]\$(parse_git_branch) \[$(tput sgr0)\]"
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
. ./z.sh
function title ()
{
TITLE=$1;
export PROMPT_COMMAND='echo -ne "\033]0;$TITLE\007"'
}
function cdd() {
cd $1
ls -A
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment