Skip to content

Instantly share code, notes, and snippets.

@manute
Last active October 25, 2023 19:28
Show Gist options
  • Save manute/5451435 to your computer and use it in GitHub Desktop.
Save manute/5451435 to your computer and use it in GitHub Desktop.
my zsh config with oh-my-zsh
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
#JAVA_HOME
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
#MAVEN
export M2_HOME=/usr/local/maven-3.0.5
export MAVEN_OPTS=-Xmx1024m
#MONGO
export MONGO_HOME=/usr/local/Cellar/mongodb/2.2.3-x86_64/bin/
#ERLANG
export ERLANG_HOME=/usr/share/erlang
#SET_ENV_FOR_ALL
export PATH=$MONGO_HOME/bin:$JAVA_HOME/bin:/usr/local/mysql/bin:$M2_HOME/bin:$ERLANG_HOME/bin:$PATH
export JAVA_OPTS="-XX:MaxPermSize=512m"
export GRAILS_OPTS="-server -Xmx1024M -XX:MaxPermSize=512m -Dfile.encoding=UTF-8"
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# ALIASES
alias zshconfig="sublime ~/.zshrc"
alias ohmyzsh="sublime ~/.oh-my-zsh"
alias changeJava6='export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home;export PATH=$JAVA_HOME/bin:$PATH;'
#ALIASES Mac Helpers
alias show_hidden="defaults write com.apple.Finder AppleShowAllFiles YES && killall Finder"
alias hide_hidden="defaults write com.apple.Finder AppleShowAllFiles NO && killall Finder"
#ALIASES GRAILS
alias testunit='grails test-app unit:'
alias testinteg='grails test-app integration:'
alias testall='grails test-app'
alias usegr2='gvm use grails 2.0.0'
alias usegr2.2='gvm use grails 2.2.0'
#ALIASES MYSQL
alias start_all_db='sudo mysqld_multi start 1;sudo mysqld_multi start 2;mongod &'
alias mysql_report='mysqld_multi report'
#ALIASES GIT
alias git_prune='git remote prune origin'
alias git_prunegit_status='git remote prune origin --dry-run'
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=( git textmate ruby lighthouse grails git-flow brew zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
PROMPT='%{$reset_color%}%n %{$fg[green]%}{%{$reset_color%}%~%{$fg[green]%}}%{$reset_color%}$(git_prompt_info)%{$fg[green]%}%{$fg[red]%} $%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
ZSH_THEME_GIT_PROMPT_CLEAN=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment