Skip to content

Instantly share code, notes, and snippets.

@baroquebobcat
Created December 8, 2013 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baroquebobcat/7864932 to your computer and use it in GitHub Desktop.
Save baroquebobcat/7864932 to your computer and use it in GitHub Desktop.
function java_change_16 {
export MY_JAVA_VERSION=1.6
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
}
function java_change_17_15 {
export MY_JAVA_VERSION=1.7_15
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_15.jdk/Contents/Home/
}
function java_change_17_21 {
export MY_JAVA_VERSION=1.7_21
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/
}
function java_change_17_25 {
export MY_JAVA_VERSION=1.7_25
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/
}
function java_change_17_40 {
export MY_JAVA_VERSION=1.7_40
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/
}
function java_change_18 {
export MY_JAVA_VERSION=1.8
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/
}
function java_change_17 {
java_change_17_25
}
java_change_17
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local WHITE="\[\033[1;37m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
case $TERM in
xterm*)
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
;;
*)
TITLEBAR=""
;;
esac
# add host back in by putting @\h after \u
PS1="${TITLEBAR}\
$BLUE[$RED\$(date +%H:%M)$BLUE]\
$BLUE[${LIGHT_GREEN}jvm-\$MY_JAVA_VERSION$BLUE]\
$BLUE[$LIGHT_GREEN\$(~/.rvm/bin/rvm-prompt s i v g)$BLUE]\
$BLUE[$RED\u:\w$GREEN\$(parse_git_branch)$BLUE]\
$BLUE\n\$ "
PS2='> '
PS4='+ '
}
proml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment