my zshrc 081122
2008年11月22日 (linux)
source
### colors
local BLACK=$'%{\e[00;30m%}'
local BLUE=$'%{\e[00;34m%}'
local L_RED=$'%{\e[01;31m%}'
local PURPLE=$'%{\e[00;35m%}'
local RED=$'%{\e[00;31m%}'
local DEFAULT=$'%{\e[00;00m%}'
### set zsh options
setopt correct
setopt nobeep
setopt prompt_subst
setopt share_history
setopt extended_glob
setopt hist_ignore_dups
### set env
PATH=~/bin:$PATH
export PATH
PROMPT=$RED'%(!.#.%%) '$DEFAULT
export PROMPT
BLOCKSIZE=K
EDITOR=vim
PAGER=less
export BLOCKSIZE EDITOR PAGER
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
export HISTFILE HISTSIZE SAVEHIST
LSCOLORS=exfxcxdxbxegedabagacad
export LSCOLORS
LESS=-g10x4
export LESS
# LANG=ja_JP.UTF-8
# LANG=C
# LC_ALL=C
# LC_ALL=ja_JP.UTF-8
# export LANG
# export LC_ALL
### load zsh functions
zmodload zsh/mathfunc
### my aliases
# alias cat='cat -n'
alias p='pwd'
alias cp='cp -i'
# alias gcc='gcc42'
alias h='history'
# alias h='history -20'
# alias h3='history -30'
# alias h5='history -50'
# alias h1='history -100'
alias l='ls -l'
alias less='less -N'
alias ls='ls -G --color=auto'
alias ll='ls -l'
alias mv='mv -i'
alias la='ls -A'
alias langc='LANG=C; export LANG'
alias langjp='LANG=ja_JP.utf-8; export LANG'
alias dates='date +%y%m%d'
alias d='langc;date +%y\/%m\/%d\ %A\ %H:%M:%S;langjp'
# alias date='langc;date +%y%m%d%a_%H%M%S;langjp'
alias -s c=cat
alias -s txt=cat
### compinit
autoload -U compinit
compinit
### login script
setterm -blength 0
setterm -bfreq 0
### shortcut key
bindkey -e
# bindkey -v
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
~/.zshrc
PR
Comment