Skip to content

Instantly share code, notes, and snippets.

@soh-i soh-i/gist:3887538
Last active Oct 11, 2015

What would you like to do?
# zaw.zsh
autoload -Uz chpwd_recent_dirs cdr add-zsh-hook
add-zsh-hook chpwd chpwd_recent_dirs
zstyle ':chpwd:*' recent-dirs-max 5000
zstyle ':chpwd:*' recent-dirs-default yes
zstyle ':completion:*' recent-dirs-insert both
source /home/soh.i/.zsh/zaw/zaw.zsh
zstyle ':filter-select' case-insensitive yes
zstyle ':filter-select' max-lines 10
zstyle ':filter-select' extended-search yes
bindkey '^@' zaw-cdr
if [ -f ~/.zsh_conf ]; then
source ~/.zsh_conf
setopt transient_rprompt
autoload -Uz add-zsh-hook
setopt auto_pushd
setopt pushd_minus
setopt pushd_ignore_dups
kill-emacsclient() {
emacsclient -e '(kill-emacs)'
kill-all-process() {
/bin/kill -9 -1
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
# terminal Title
case "${TERM}" in
precmd() {
echo -ne "\033]0;${USER}@${HOST%%.*}\007"
# shell prompt
setopt prompt_subst
PROMPT="%U%F{green}$FACE@%m >> %u%f"
# Keybiand emacs
bindkey -e
#allow tab completion in the middle of a word
#keep background processes at full speed
# Core size
limit coredumpsize 0
# restart running processes on exit
setopt nohup
setopt nocheckjobs
## never ever beep ever
setopt NO_BEEP
## automatically decide when to page a list of completions
autoload -U colors
## Add comment onto one-liner
setopt interactive_comments
setopt no_clobber
## History
setopt extended_history #add time
setopt inc_append_history
setopt hist_verify
setopt share_history
setopt hist_ignore_dups
bindkey '^R' history-incremental-pattern-search-backward
bindkey '^S' history-incremental-pattern-search-forward
## () completion
setopt auto_param_keys
## comletion
setopt always_last_prompt
setopt magic_equal_subst
setopt auto_list
setopt list_types
setopt auto_menu
setopt auto_param_keys
setopt auto_param_slash
zstyle ':completion:*:default' menu select=2
zstyle ':completion:*' list-colors di=34 fi=0
autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^P" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end
setopt list_packed
zstyle ':completion:*' format '%B%d%b'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' use-cache true
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*:manuals' separate-sections true
zstyle ':completion:*' list-separator '-->'
bindkey "^[[Z" reverse-menu-complete
## logout
setopt ignore_eof
unset autologout
setopt auto_cd
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
setopt auto_pushd
setopt pushd_ignore_dups
## initialize
autoload -U compinit
compinit -u
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

This comment has been minimized.

Copy link
Owner Author

soh-i commented Jul 8, 2013

# zsh.conf
# autojump
#[[ -f ~/.autojump/etc/profile.d/autojump.zsh ]] && source ~/.autojump/etc/profile.d/autojump.zsh

# perl5(local::lib)
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)

# My perl modules (MyUtil::IO::*)
export PERL5LIB=/home/soh.i/lib/:$PERL5LIB

# system perl modules
#export PERL5LIB=/usr/lib/perl5/site_perl/5.8.8/:$PERL5LIB

# python
[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc

# rbenv
export PATH=/home/soh.i/.rbenv/bin:$PATH
export PATH=/home/soh.i/.rbenv/shims:$PATH
export PATH=/home/soh.i/.rbenv/versions/1.9.3-p194/bin:$PATH

# alias
alias emacs='emacsclient -nw -a ""'
alias mv='mv -i'
alias which='which -a'
alias screenkill="ps ax | grep SCREEN | awk '{print $1}' | xargs kill"
alias sl='ls'
alias ks='ls'
alias kess='less'
alias lc='lv'
alias logout='exit'
alias p='ps ux'
alias ftp='/home/soh.i/bin/bin/ncftp'
alias shm='cd /dev/shm'
alias up='popd'
alias down='pushd'
alias rm='rm -i'
alias ls='ls -tF --color'
alias ll='ls -tFl'
alias la='ls -an'
alias grep='grep --color'
alias c='clear'
alias history='history 1'
alias ta="tmux attach"
alias lf='ls -FA'
alias iris='ssh iris'
alias gh='fg'
alias gf='fg'
alias less='less -M'
alias R='R --quiet'

export MANPATH=/home/soh.i/bin/man:$MANPATH
export PKG_CONFIG_PATH=/home/soh.i/bin/lib/pkgconfig/
export PYTHONPATH='/home/soh.i/bin/numpy-1.6.2/build/temp.linux-x86_64-2.7:$PYTHONPATH'
export LD_LIBRARY_PATH=/home/soh.i/opt/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.