Last active
December 20, 2015 11:39
-
-
Save fallenhitokiri/6125561 to your computer and use it in GitHub Desktop.
quick zsh configuration
This file contains 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
autoload -U colors && colors | |
autoload -U compinit && compinit | |
# completion | |
zstyle ':completion:*' menu select | |
setopt completealiases | |
# history | |
HISTFILE=$HOME/.zsh_history | |
HISTSIZE=1000 | |
SAVEHIST=1000 | |
setopt inc_append_history | |
setopt share_history | |
setopt extended_history | |
setopt hist_expire_dups_first | |
setopt hist_ignore_dups | |
setopt hist_ignore_space | |
setopt hist_verify | |
bindkey '\e[A' history-search-backward | |
bindkey '\e[B' history-search-forward | |
# PROMPT | |
setopt PROMPT_SUBST | |
function prompt_char { | |
if [ $UID -eq 0 ]; then echo "#"; else echo $; fi | |
} | |
VIRTUAL_ENV_DISABLE_PROMPT=1 | |
function virtualenv_info { | |
[ $VIRTUAL_ENV ] && echo '*' | |
} | |
PROMPT='%{$fg[blue]%}%m %{$fg[red]%}%(!.%1~.%~) %{$fg[blue]%}%_$(prompt_char)%{$reset_color%} ' | |
RPROMPT='%{$fg[red]%}%_$(virtualenv_info)%{$reset_color%}' | |
# chruby | |
source /usr/local/share/chruby/chruby.sh | |
source /usr/local/share/chruby/auto.sh | |
# aliases | |
alias lpsql="postgres -D /usr/local/var/postgres" | |
alias lredis="redis-server /usr/local/etc/redis.conf" | |
alias fm="foreman run python manage.py" | |
alias ve="source venv/bin/activate" | |
# PATH | |
export GOROOT=/usr/local/Cellar/go/1.1.1 | |
export PATH=/usr/local/bin:$GOROOT/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment