Last active
January 4, 2016 02:09
-
-
Save neiraza/8552890 to your computer and use it in GitHub Desktop.
参考
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias ls='ls --color' | |
export LV='-Ou8 -c' | |
export LESS='-R' | |
bindkey -e | |
bindkey '^R' history-incremental-pattern-search-backward | |
bindkey '^S' history-incremental-pattern-search-forward | |
HISTFILE=~/.zsh_history | |
HISTSIZE=100000 | |
SAVEHIST=100000 | |
autoload -U compinit | |
compinit -u | |
setopt always_last_prompt # 補完のときプロンプトの位置を変えない | |
setopt auto_cd # ディレクトリ名を入力するだけでカレントディレクトリを変更 | |
setopt auto_list # 補完候補が複数ある時に一覧表示 | |
setopt auto_menu # 補完キーを連打するだけで順に補完候補を自動で補完 | |
setopt auto_param_keys # カッコの対応などを自動的に補完 | |
setopt auto_param_slash # ディレクトリ名の補完で末尾の / を自動的に付加し、次の補完に備える | |
setopt auto_pushd # cd 時に自動で pushd | |
setopt auto_resume # サスペンド中のプロセスと同じコマンド名を実行した場合はリジューム | |
setopt brace_ccl # {a-c} を a b c に展開する機能を使えるようにする | |
setopt complete_aliases # 補完される前にオリジナルのコマンドまで展開してチェックする | |
setopt complete_in_word # 語の途中でもカーソル位置で補完 | |
setopt correct # スペルチェック | |
setopt equals # =command を command のパス名に展開する | |
setopt extended_glob # ファイル名で #, ~, ^ の 3 文字を正規表現として扱う | |
setopt extended_history # zsh の開始, 終了時刻をヒストリファイルに書き込む | |
setopt hist_ignore_all_dups # 重複したヒストリは追加しない | |
setopt hist_ignore_dups # 直前と同じコマンドラインはヒストリに追加しない | |
setopt hist_ignore_space # コマンドラインの先頭がスペースで始まる場合ヒストリに追加しない | |
setopt hist_no_store # history (fc -l) コマンドをヒストリリストから取り除く。 | |
setopt hist_reduce_blanks # 余分なスペースを削除してヒストリに記録する | |
setopt hist_verify # ヒストリを呼び出してから実行する間に一旦編集できる状態になる | |
setopt interactive_comments # コマンドラインでも # 以降をコメントと見なす | |
setopt list_packed # 保管結果をできるだけ詰める | |
setopt list_types # 補完候補一覧でファイルの種別をマーク表示 | |
setopt long_list_jobs # 内部コマンド jobs の出力をデフォルトで jobs -l にする | |
setopt magic_equal_subst # --prefix=/usr などの = 以降も補完 | |
setopt mark_dirs # ファイル名の展開でディレクトリにマッチした場合末尾に / を付加する | |
setopt menu_complete # 補完候補が複数ある時、一覧表示 (auto_list) せず、すぐに最初の候補を補完する | |
setopt multios # 複数のリダイレクトやパイプなど、必要に応じて tee や cat の機能が使われる | |
setopt no_list_beep # 補完の時にベルを鳴らさない | |
setopt numeric_glob_sort # ファイル名の展開で、辞書順ではなく数値的にソートされるようになる | |
setopt print_exit_value # 戻り値が 0 以外の場合終了コードを表示する | |
setopt short_loops # for, repeat, select, if, function などで簡略文法が使えるようになる | |
setopt print_eight_bit # 8 ビット目を通すようになり、日本語のファイル名などを見れるようになる | |
setopt prompt_subst # 色を使う | |
setopt pushd_ignore_dups # 同じディレクトリを pushd しない | |
setopt notify # ジョブの状態をただちに知らせる | |
setopt share_history # シェルのプロセスごとに履歴を共有 | |
bindkey -e | |
bindkey '^R' history-incremental-pattern-search-backward | |
bindkey '^S' history-incremental-pattern-search-forward | |
bindkey "^I" menu-complete | |
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 "^X^P" history-beginning-search-backward-end | |
bindkey "^X^N" history-beginning-search-forward-end | |
autoload -Uz colors | |
colors | |
PROMPT="%{^[[32m%}%n@%m%{^[[33m%}${WINDOW:+[$WINDOW]} %{^[[33m%}%~ | |
%{^[[36m%}%* %{^[[35m%}%#%{^[[m%} " | |
zstyle ':completion:*' group-name '' | |
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
zstyle ':completion:*' keep-prefix | |
zstyle ':completion:*:default' menu select=2 | |
eval `dircolors` | |
zstyle ':completion:*:default' list-colors ${LS_COLORS} | |
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([%0-9]#)*=0=01;31' | |
zstyle ':completion:*' verbose yes | |
zstyle ':completion:*' completer _oldlist _complete _match _ignored _approximate _list _history _expand _prefix | |
zstyle ':completion:*:messages' format $fg_bold[yellow]'%d'$reset_color | |
zstyle ':completion:*:warnings' format $fg_bold[red]'No matches for:'$fg_bold[yellow]' %d'$reset_color | |
zstyle ':completion:*:descriptions' format $fg_bold[yellow]'%B%d%b'$reset_color | |
zstyle ':completion:*:corrections' format $fg_bold[yellow]'%B%d '$fg_bold[red]'(errors: %e)%b'$reset_color | |
zstyle ':completion:*:options' description 'yes' | |
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' formats '(%s)-[%b]' | |
zstyle ':vcs_info:*' actionformats '(%s)-[%b|%a]' | |
precmd () { | |
psvar=() | |
LANG=en_US.UTF-8 vcs_info | |
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_" | |
} | |
RPROMPT="%1(v|%F{green}%1v%f|)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment