| 1 | #$Id$ |
|---|
| 2 | autoload promptinit |
|---|
| 3 | promptinit |
|---|
| 4 | #setopt prompt_subst |
|---|
| 5 | setopt extendedglob |
|---|
| 6 | ### |
|---|
| 7 | # Set shell options |
|---|
| 8 | ### |
|---|
| 9 | setopt auto_menu auto_cd correct auto_name_dirs auto_remove_slash |
|---|
| 10 | setopt hist_ignore_dups hist_ignore_space prompt_subst |
|---|
| 11 | setopt pushd_ignore_dups rm_star_silent sun_keyboard_hack |
|---|
| 12 | setopt extended_glob list_types no_beep always_last_prompt |
|---|
| 13 | setopt cdable_vars sh_word_split auto_param_keys |
|---|
| 14 | setopt append_history inc_append_history |
|---|
| 15 | setopt share_history |
|---|
| 16 | setopt always_last_prompt |
|---|
| 17 | setopt hist_ignore_space |
|---|
| 18 | setopt complete_in_word |
|---|
| 19 | setopt auto_pushd |
|---|
| 20 | #prompt elite2 |
|---|
| 21 | prompt redhat |
|---|
| 22 | autoload -U compinit |
|---|
| 23 | compinit |
|---|
| 24 | bindkey -v |
|---|
| 25 | unsetopt promptcr |
|---|
| 26 | |
|---|
| 27 | # tcsh like history expansion |
|---|
| 28 | autoload -U history-search-end |
|---|
| 29 | zle -N history-beginning-search-forward-end history-search-end |
|---|
| 30 | zle -N history-beginning-search-backward-end history-search-end |
|---|
| 31 | bindkey "^N" history-beginning-search-forward-end |
|---|
| 32 | bindkey "^P" history-beginning-search-backward-end |
|---|
| 33 | bindkey "^R" history-incremental-search-backward |
|---|
| 34 | # URL quote |
|---|
| 35 | autoload -U url-quote-magic |
|---|
| 36 | zle -N self-insert url-quote-magic |
|---|
| 37 | # history option |
|---|
| 38 | # history log file |
|---|
| 39 | HISTFILE=$HOME/.zsh-history |
|---|
| 40 | HISTSIZE=100000 |
|---|
| 41 | SAVEHIST=100000 |
|---|
| 42 | setopt extended_history |
|---|
| 43 | # show all history |
|---|
| 44 | function history-all { history -E 1 } |
|---|
| 45 | |
|---|
| 46 | export ZLS_COLORS='di=01;34' |
|---|
| 47 | zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} |
|---|
| 48 | export PATH="$HOME/bin:$HOME/share/maven/bin:$HOME/share/apache-ant/bin:/opt/local/bin:$PATH" |
|---|
| 49 | export SVN_EDITOR="vim" |
|---|
| 50 | export EDITOR="vim" |
|---|
| 51 | export LANG=ja_JP.UTF-8 |
|---|
| 52 | export LC_ALL=ja_JP.UTF-8 |
|---|
| 53 | export MANPAGER="lv" |
|---|
| 54 | |
|---|
| 55 | export JAVA_HOME=/usr/lib/jdk |
|---|
| 56 | export CLASSPATH=".:$JAVA_HOME/lib:$HOME/.m2/repository:$HOME/lib/java" |
|---|
| 57 | |
|---|
| 58 | alias -g sc="screen" |
|---|
| 59 | alias vi="vim" |
|---|
| 60 | alias cd=" cd" |
|---|
| 61 | alias pwd=" pwd" |
|---|
| 62 | alias p=" pwd" |
|---|
| 63 | alias ls=' ls --color=auto' |
|---|
| 64 | alias grep='grep --color=auto' |
|---|
| 65 | alias la='ls -a' |
|---|
| 66 | alias ll='ls -l' |
|---|
| 67 | alias l='ls -l' |
|---|
| 68 | alias p='pwd' |
|---|
| 69 | alias -g G="| grep" |
|---|
| 70 | alias -g L='| vim -R -c "set nowrap" -' |
|---|
| 71 | alias ipy='ipython -logfile $HOME/.python_history' |
|---|
| 72 | alias info='info --vi-keys' |
|---|
| 73 | alias w3m='w3m -no-mouse -cookie -o accept_bad_cookie=1' |
|---|
| 74 | alias less="lv" |
|---|
| 75 | |
|---|
| 76 | |
|---|
| 77 | ## debug |
|---|
| 78 | #zstyle ':completion:*' verbose yes |
|---|
| 79 | #zstyle ':completion:*:descriptions' format '%B%d%b' |
|---|
| 80 | #zstyle ':completion:*:messages' format '%d' |
|---|
| 81 | #zstyle ':completion:*:warnings' format 'No matches for: %d' |
|---|
| 82 | #zstyle ':completion:*' group-name '' |
|---|
| 83 | #fpath=(~/dev/zsh $fpath) |
|---|
| 84 | autoload -U ~/dev/zsh/*(:t) |
|---|
| 85 | # |
|---|
| 86 | preexec () { |
|---|
| 87 | echo -ne "\ek${1%% *}\e\\" |
|---|
| 88 | } |
|---|
| 89 | |
|---|
| 90 | [ ${STY} ] || screen -D -RR |
|---|
| 91 | |
|---|
| 92 | r() { |
|---|
| 93 | local f |
|---|
| 94 | f=(~/dev/zsh/*(.)) |
|---|
| 95 | unfunction $f:t 2> /dev/null |
|---|
| 96 | autoload -U $f:t |
|---|
| 97 | } |
|---|