Skip to content

Instantly share code, notes, and snippets.

@britter
Created December 14, 2013 15:13
Show Gist options
  • Save britter/7960392 to your computer and use it in GitHub Desktop.
Save britter/7960392 to your computer and use it in GitHub Desktop.
My .bash_profile used on my MacBooko Pro: Includes development tools in PATH. Prepends /usr/local/bin and /usr/local/sbin to PATH, since on Mac OS the default PATH has /usr/bin before /usr/local/bin (for what ever reason). Sets up the prompt and bash completion. Configures man pages to be shown in PDF Viewer.
## SDKs ##
export JAVA_6_HOME=`/usr/libexec/java_home -v 1.6`
export JAVA_7_HOME=`/usr/libexec/java_home -v 1.7`
export JAVA_8_HOME=`/usr/libexec/java_home -v 1.8`
export JAVA_HOME=$JAVA_7_HOME
export GROOVY_HOME=/Applications/dev/groovy/groovy-2.1.5
export SCALA_HOME=/Applications/dev/scala/scala-2.10.2
## Build Tools ##
export MAVEN_HOME=/Applications/dev/maven/apache-maven-3.1.1
export ANT_HOME=/Applications/dev/ant/apache-ant-1.9.2
export GRADLE_HOME=/Applications/dev/gradle/gradle-1.6
export LEININGEN_HOME=/Applications/dev/leiningen/lein-2.2.0
export SBT_HOME=/Applications/dev/scala/sbt/0.12.4
## PATH ##
export PATH=/usr/local/bin:/usr/local/sbin:$JAVA_HOME/bin:$GROOVY_HOME/bin:$SCALA_HOME/bin:$MAVEN_HOME/bin:$ANT_HOME/bin:$GRADLE_HOME/bin:$LEININGEN_HOME:$SBT_HOME/bin:$PATH
## Bash look and feel
export CLICOLOR=1
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
pman () { man -t "${1}" | open -f -a "Preview"; }
complete -o default -o nospace -W "$(/usr/bin/env ruby -ne 'puts $_.split(/[,\s]+/)[1..-1].reject{|host| host.match(/\*|\?/)} if $_.match(/^\s*Host\s+/);' < $HOME/.ssh/config)" scp sftp ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment