Created
November 10, 2008 19:07
-
-
Save paul/23587 to your computer and use it in GitHub Desktop.
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
HISTFILE=$HOME/.zsh_history | |
HISTSIZE=5000 | |
SAVEHIST=10000 # useful for setopt append_history | |
export EDITOR='vim' | |
export PAGER='most' | |
export SHELL='/bin/zsh' | |
PATH=./bin:$HOME/bin:$PATH:/usr/sbin:/opt/kde/bin:/opt/openoffice/program | |
BC_ENV_ARGS="-q -l /home/rando/.bc/extensions.bc" | |
export MPD_HOST="localhost" | |
export MPD_PORT=6600 | |
export IRBRC="$HOME/.irbrc" | |
#gentoo portage completion | |
autoload -U compinit promptinit | |
compinit | |
promptinit | |
# cache completions | |
zstyle ':completion::complete:*' use-cache 1 | |
# autocd | |
setopt autocd | |
cdpath=( ~/dev ~/ ) | |
eval $(dircolors -b ~/.dircolors) | |
alias ls='ls -l -F -1 --color=auto --group-directories-first' | |
alias ll='ls -al' | |
alias grep='egrep --color=tty' | |
alias dev='cd ~/dev' | |
alias core='cd ~/dev/core/web' | |
alias alarm='cd ~/dev/alarm/web' | |
alias rubyee='/opt/ruby-enterprise/bin/ruby' | |
alias gemee='/opt/ruby-enterprise/bin/gem' | |
alias rakeee='/opt/ruby-enterprise/bin/rake' | |
alias merbee='/opt/ruby-enterprise/bin/ruby ./bin/merb -a thin' | |
alias gems='cd /usr/lib/ruby/gems/1.8/gems' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias f="find . ! -wholename '*.git*' -and ! -wholename '*.svn*' | xargs grep -i -n --colour=auto -E " | |
alias F="find . ! -wholename '*.git*' -and ! -wholename '*.svn*' | xargs grep -n --colour=auto -E " | |
alias fn="find . ! -wholename '*.git' -and ! -wholename '*.svn*' -iname " | |
alias cj="curl-json.sh " | |
alias d='dirs -v' | |
alias e=$EDITOR | |
alias h=history | |
alias j=jobs | |
alias po=popd | |
alias pu=pushd | |
alias m=most | |
alias c=cat | |
alias l=less | |
alias h=head | |
alias t='tail -F' | |
# Arch | |
alias p="sudo pacman-color" | |
alias y="yaourt --aur" | |
# git | |
alias gc='git commit' | |
alias gst='git status' | |
alias gco='git checkout' | |
alias gp='git pull' | |
alias gpu='git push' | |
alias gaa='git add .' | |
alias gb='git branch' | |
#global alias: does not need to be at beginning of a line | |
alias -g M='|more' | |
alias -g L='|less' | |
alias -g H='|head' | |
alias -g T='|tail' | |
alias -g SSCJ='application/vnd.absperf.sscj1+json' | |
alias -g SSMJ='application/vnd.absperf.ssmj1+json' | |
alias -g SSJ='application/vnd.absolute-performance.sysshep+json' | |
autoload -U compinit | |
autoload history-search-end | |
bindkey ' ' magic-space # also do history expansion on space | |
bindkey '\ei' menu-complete # menu completion via esc-i | |
# Make home/end work | |
bindkey "^[[1~" beginning-of-line | |
bindkey "^[[4~" end-of-line | |
umask 022 | |
bindkey -e #vi mode | |
setopt append_history # append history list to the history file (important for multiple parallel zsh sessions!) | |
#setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session | |
setopt extended_history # save each command's beginning timestamp and the duration to the history file | |
setopt histignorespace # remove command lines from the history list when | |
setopt correct # try to correct the spelling if possible | |
setopt extended_glob # in order to use #, ~ and ^ for filename generation | |
# grep word *~(*.gz|*.bz|*.bz2|*.zip|*.Z) -> | |
# -> searches for word not in compressed files | |
# don't forget to quote '^', '~' and '#'! | |
setopt notify # report the status of backgrounds jobs immediately | |
setopt hash_list_all # Whenever a command completion is attempted, make sure \ | |
# the entire command path is hashed first. | |
setopt completeinword # not just at the end | |
setopt auto_pushd # make cd push the old directory onto the directory stack. | |
setopt nonomatch # try to avoid the 'zsh: no matches found...' | |
setopt nobeep # avoid "beep"ing | |
# rebind up/down to search history | |
bindkey '\e[A' history-search-backward | |
bindkey '\e[B' history-search-forward | |
# preemtive auto-completion | |
autoload predict-on | |
zle -N predict-on | |
zle -N predict-off | |
bindkey '^Z' predict-on | |
bindkey '^X^Z' predict-off | |
zstyle ':predict' toggle true | |
zstyle ':predict' verbose true | |
local blue_op="%{$fg[blue]%}[%{$reset_color%}" | |
local blue_cp="%{$fg[blue]%}]%{$reset_color%}" | |
local path_p="${blue_op}%~${blue_cp}" | |
local user_host="${blue_op}%n@%m${blue_cp}" | |
local ret_status="${blue_op}%?${blue_cp}" | |
local hist_no="${blue_op}%h${blue_cp}" | |
PROMPT="${path_p}${user_host} | |
%# " | |
local cur_cmd="${blue_op}%_${blue_cp}" | |
PROMPT2="${cur_cmd}> " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment