最強のシェルzsh
数あるシェルの中でもzshが最強だという噂をきき。
ご本を読みながら設定してみました。
- 作者: 中島能和
- 出版社/メーカー: 翔泳社
- 発売日: 2008/12/04
- メディア: 単行本(ソフトカバー)
- 購入: 7人 クリック: 175回
- この商品を含むブログ (50件) を見る
使ってみて、やっぱ違います。
かゆいところに手が届くとはよく言ったもんで、作業効率もあがるってもんです。
とりあえず設定した.zshrcをば。
autoload -U compinit compinit ###permittion### umask 022 ###option### setopt auto_pushd setopt auto_cd setopt correct setopt cdable_vars setopt noclobber # deny redirection without new file setopt list_packed setopt list_rows_first #display vartical direction ###key bind### bindkey -e ###history### HISTFILE=~/.zsh_history HISTSIZE=10000000 SAVEHIST=10000000 setopt hist_ignore_dups #ignore same command history setopt share_history #share command history data setopt hist_ignore_space #ignore the command which begins with space setopt hist_reduce_blanks #delete vain space 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 ###prompt### autoload colors colors PROMPT="%{${fg[red]}%}[%n@%m]%# %{${reset_color}%}" PROMPT2="%{${fg[green]}%}%_> %{${reset_color}%}" SPROMPT="%{${fg[blue]}%}correct: %R -> %r [nyae]? %{${reset_color}%}" RPROMPT="%{${fg[red]}%}[%~]%{${reset_color}%}" ###alias### alias la='ls -a' alias ll="ls -l" alias lsa='ls -ld .*' ###global alias### alias -g M='|more' alias -g G='|grep -i' alias -g L='|less' ###env var### export LANG=ja_JP.UTF-8