Created
April 25, 2015 19:08
-
-
Save vjwilson/d7f887b75543a9e5477b to your computer and use it in GitHub Desktop.
Sample .bash_profile on Mac OS X
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
HISTFILESIZE=1000000000 HISTSIZE=100000 | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
_complete_ssh_hosts () | |
{ | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \ | |
cut -f 1 -d ' ' | \ | |
sed -e s/,.*//g | \ | |
grep -v ^# | \ | |
uniq | \ | |
grep -v "\[" ; | |
cat ~/.ssh/config | \ | |
grep "^Host " | \ | |
awk '{print $2}' | |
` | |
COMPREPLY=( $(compgen -W "${comp_ssh_hosts}" -- $cur)) | |
return 0 | |
} | |
complete -F _complete_ssh_hosts ssh | |
export PGDATA=/Library/PostgreSQL/9.2/data | |
export PATH=$PATH:/usr/local/bin:/usr/local/rvm/gems/ruby-1.9.3-p392/bin:/usr/local/rvm/gems/ruby-1.9.3-p392@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin:/Users/van/bin/ | |
export PATH=$PATH:/Library/PostgreSQL/9.2/bin/:$HOME/bin/ | |
export MAMP_PHP=/Applications/MAMP/bin/php/php5.4.10/bin | |
export PATH="$MAMP_PHP:$PATH" | |
PATH=$PATH:/Applications/VirtualBox.app/Contents/MacOS/ | |
export PATH | |
source /usr/local/share/zsh/site-functions/git-completion.bash | |
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h: \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | |
export PROMPT_COMMAND='echo -ne "\033]0;${PWD}\007"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment