#Version = '20140312-081658' #encoding: utf-8 #command completion autoload -Uz compinit compinit zstyle ':completion:*' auto-description 'specify: %d' zstyle ':completion:*' completer _expand _complete _correct _approximate zstyle ':completion:*' format 'Completing %d' zstyle ':completion:*' group-name '' zstyle ':completion:*' menu select=2 eval "$(gdircolors -b)" zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} #zstyle ':completion:*' list-colors '' zstyle ':completion:*' list-colors 'di=01;34' 'ln=01;36' 'ex=01;32' zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' zstyle ':completion:*' menu select=long zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s zstyle ':completion:*' use-compctl false zstyle ':completion:*' verbose true zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' setopt list_packed setopt mark_dirs setopt bash_auto_list setopt list_ambiguous setopt equals setopt nolistbeep setopt noautoremoveslash setopt magic_equal_subst setopt auto_param_keys setopt auto_param_slash setopt list_types setopt nobeep setopt nonomatch # for scp wildcard # command prediction from history #autoload predict-on #predict-on autoload -U predict-on zle-line-init() { predict-on } zle -N zle-line-init zle -N predict-on zle -N predict-off zstyle ':predict' verbose true #bindkey '^j^k' predict-off bindkey '^l' expand-or-complete bindkey '^f' forward-word bindkey '^b' backward-word bindkey '^j' predict-off #autoload -U predict-on #zle -N predict-on #zle -N predict-off #bindkey '^o^p' predict-on #bindkey '^op' predict-off #bindkey '^n' predict-on #bindkey '^o^p' predict-off #zstyle ':predict' toggle true #zstyle ':predict' verbose true # prompt theme #autoload -Uz promptinit #promptinit #prompt walters # prompt #export LSCOLORS='ExGx' PS1=$'%B%F{green}%n@%m%f:%F{blue}%~%f%b\n$ ' RPS1=$'%D %T' # load math functions zmodload -i zsh/mathfunc # zediter autoload zed # emacs-like key bind, bindkey -L shows list, bindkey -e vi-like bindkey -e # history HISTSIZE=10000 SAVEHIST=10000 HISTFILE=~/.zsh_history setopt hist_ignore_all_dups setopt hist_reduce_blanks setopt share_history setopt hist_no_store # cd setopt auto_cd setopt auto_pushd setopt pushd_ignore_dups # ls color case "${OSTYPE}" in darwin*) ## alias ls="ls -G" ## alias ll="ls -lG" ## alias la="ls -laG" alias ls='gls --color=auto' alias ll='gls -l --color' alias la='gls -la --color' alias lh='gls -lh --color' ;; linux*) alias ls='ls --color=auto' alias ll='ls -l --color' alias la='ls -la --color' alias lh='ls -lh --color' ;; esac # file-extention application relation alias -s txt=vim alias -s dat=vim alias -s tgz='tar zxvf' alias -s bib=vim # global alias alias -g G="| grep" alias -g WC="| wc" alias -g LC="| wc -l" # normal alias alias back='popd' # cd -[TAB] shows stack list alias ss='screen -S' alias sl='screen -ls' alias sx='screen -x' alias comlog='if [ ! -e "command.log" ];then date +"#%Y%m%d masa" > command.log;fi;history|tail -n 1|cut -d " " -f 4- >> command.log' function keyls() { echo ls echo echo echo zle reset-prompt } zle -N keyls bindkey 'à' keyls bindkey '^n' keyls function keylh() { echo lh echo echo echo zle reset-prompt } zle -N keylh bindkey '\£' keylh bindkey '^h' keylh function cdup() { cd .. zle reset-prompt } zle -N cdup bindkey '§' cdup function cdbk() { cd - zle reset-prompt } zle -N cdbk bindkey '°' cdbk function dush() { du -sh * echo echo echo zle reset-prompt } zle -N dush bindkey 'é' dush # #source ~/.bashrc #source ~/.auto-fu.zsh source ~/.aliases stty stop undef stty start undef