なんか全身に倦怠感。ちとやばめ
だるい中、.zshrcの整理をしてるオレがいる。
参考にしたページ[Z-Shell Frequently-Asked Questions (Japanese),zshの設定,【至高のコマンドインタプリタzsh】,zshoptions のマニュアル(訳)]
現在の.zshrcの中身
#history
HISTFILE=$HOME/.zsh-history
HISTSIZE=100000
SAVEHIST=100000
setopt extended_history
function history-all { history -E 1 }
setopt share_history
setopt hist_ignore_all_dups
setopt hist_ignore_dups
setopt hist_reduce_blanks
setopt hist_ignore_space
setopt extended_history
#prompt
autoload -U colors; colors
autoload -U compinit
compinit -u
zstyle ':completion:*:default' menu select truelocal GREEN=$'%{\e[1;32m%}'
local BLUE=$'%{\e[1;34m%}'
local DEFAULT=$'%{\e[1;m%}'PROMPT=$BLUE'[%n@%m] > '$DEFAULT
RPROMPT=$GREEN'[%~]'$DEFAULT
setopt prompt_subst
#etc.
autoload -U predict-on
zle -N predict-on
zle -N predict-off
bindkey '^xp' predict-on
bindkey '^x^p' predict-off
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'setopt print_eight_bit
setopt menu_complete auto_cd correct auto_name_dirs auto_remove_slash
setopt prompt_subst pushd_ignore_dups rm_star_silent sun_keyboard_hack
setopt extended_glob list_types no_beep always_last_prompt
setopt cdable_vars sh_word_split auto_param_keys# alias & function
alias -g L="| less"
alias -g G="| grep"
alias les="less" #for typo
ヒストリー関係はもう直す必要はないかな。
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
を指定するとC-wで/単位で文字が消えてくれるので楽。
C-rが連発するような場面になったらC-x,pで自動補間モード発動。
という仕様。
他にもcompctl -D -f + -U -Q -K multicomp と記述して
tab一発で/u/l/b → /usr/local/bin
という技も試してみたが動きがちょっと気持ち悪いのでこれはヤメにした。