Skip to content

Instantly share code, notes, and snippets.

@nashby
Forked from yas375/gist:733134
Created July 27, 2011 12:27
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 nashby/1109256 to your computer and use it in GitHub Desktop.
Save nashby/1109256 to your computer and use it in GitHub Desktop.
[ -f $HOME/.profile ] && . $HOME/.profile
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=$HOME/.zsh_history
setopt append_history
setopt inc_append_history
setopt extended_history
setopt hist_find_no_dups
setopt hist_ignore_all_dups
setopt hist_reduce_blanks
setopt hist_ignore_space
setopt hist_no_store
setopt hist_no_functions
setopt no_hist_beep
setopt hist_save_no_dups
setopt prompt_subst
autoload -U compinit && compinit
autoload -U select-word-style && select-word-style bash
autoload -U colors && colors
autoload -U vcs_info
zstyle ':vcs_info:*' enable git svn
zstyle ':vcs_info:*' actionformats '(%s)-[%b|%a] '
zstyle ':vcs_info:*' formats '(%s)-[%b] '
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b'
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'
precmd() {
print -Pn "\e]0;%~\a"
vcs_info
}
preexec() {
print -Pn "\e]0;%~ :: $1\a"
}
PROMPT='%B%F{blue}%~%f%b ${vcs_info_msg_0_}%B%F{blue}%#%f%b '
RPROMPT='%B%F{blue}%T'
#RPROMPT=$'%{\e[1;34m%}%T%{\e[0m%}' # right prompt with time
eval `dircolors` && zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
alias ls='ls --color=always'
alias ll='ls -lah'
alias grep='grep --color=always'
alias trt='touch tmp/restart.txt'
alias prst='passenger start'
alias less='less -R'
alias pwgen='pwgen -1cnsB'
alias ack='ack -a'
export EDITOR='vim'
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
if [[ "$TERM" == "dumb" ]]
then
unsetopt zle
unsetopt prompt_cr
unsetopt prompt_subst
unfunction precmd
unfunction preexec
PS1='$ '
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment