Skip to content

Instantly share code, notes, and snippets.

@rafagomes
Last active August 29, 2015 14:10
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 rafagomes/20ebb24204b50d2d0211 to your computer and use it in GitHub Desktop.
Save rafagomes/20ebb24204b50d2d0211 to your computer and use it in GitHub Desktop.
My Zshell setup with git, rails, osx
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# 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="avit"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="false"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# 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)
# Add wisely, as too many plugins slow down shell startup.
plugins=(rails git ruby bundler osx rvm)
# User configuration
export PATH="/Users/mbp-gomes/.rvm/gems/ruby-2.0.0-p576/bin:/Users/mbp-gomes/.rvm/gems/ruby-2.0.0-p576@global/bin:/Users/mbp-gomes/.rvm/rubies/ruby-2.0.0-p576/bin:/usr/local/heroku/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Users/mbp-gomes/.rvm/bin:/Users/mbp-gomes/.rvm/bin:/sdk/tools:/sdk/platform-tools:/usr/local/Cellar/android-ndk/r9c"
# export MANPATH="/usr/local/man:$MANPATH"
source $ZSH/oh-my-zsh.sh
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
PATH="/usr/local/mysql/bin:$PATH"
PATH=/usr/local/bin:$PATH
#python
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
WORKON_HOME=$HOME/Envs
PROJECT_HOME=$HOME/Sites/pythonProjects
source /usr/local/bin/virtualenvwrapper.sh
#android
#export ANDROID_SDK="/usr/local/opt/android-sdk"
ANDROID_SDK=$Home/sdk
ANDROID_HOME=$HOME/sdk
ANDROID_NDK="/usr/local/Cellar/android-ndk/r9c"
PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK"
#show hidden files
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
#MONGODB
alias mongostart="launchctl start org.mongodb.mongod"
alias mongostop="launchctl stop org.mongodb.mongod"
#ANSIBLE
ANSIBLE_HOSTS=/Users/mbp-gomes/ansible
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function prompt_rvm {
rbv=`rvm-prompt`
rbv=${rbv#ruby-}
[[ $rbv == *"@"* ]] || rbv="${rbv}@default"
echo $rbv
}
#autocomplete
autoload -U compinit
compinit
PROMPT='%{$fg[yellow]%} ($(prompt_rvm)) %{$reset_color%}%{$fg[blue]%}%n@%m %{$fg[cyan]%}%~ %{$fg[red]%}$(parse_git_branch) '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment