Created
April 7, 2015 22:07
-
-
Save sgykfjsm/071c724ea52f59e583cd to your computer and use it in GitHub Desktop.
This file contains 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
source ${HOME}/.zsh_tools/zaw/zaw.zsh | |
bindkey '^R' zaw-history | |
bindkey -M filterselect '^R' down-line-or-history | |
bindkey -M filterselect '^S' up-line-or-history | |
bindkey -M filterselect '^E' accept-search | |
zstyle ':filter-select:highlight' matched fg=green | |
zstyle ':filter-select' max-lines 10 | |
zstyle ':filter-select' rotate-list yes # enable rotation for filter-select | |
zstyle ':filter-select' case-insensitive yes # enable case-insensitive | |
zstyle ':filter-select' extended-search yes # see https://github.com/zsh-users/zaw/blob/master/README.rst | |
# 履歴ファイルの保存先 | |
export HISTFILE=${HOME}/.zsh_hitory | |
# メモリに保存される履歴件数 | |
export HISTSIZE=10000 | |
# 履歴ファイルに保存される履歴件数 | |
export SAVEHIST=100000 | |
# 登録済コマンド行は古い方を削除 | |
setopt hist_ignore_all_dups | |
# 開始と終了を記録 | |
setopt EXTENDED_HISTORY | |
# 全履歴を表示する | |
function history_all { history -i 1 } | |
# history (fc -l) コマンドをヒストリリストから取り除く。 | |
setopt hist_no_store | |
# | |
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 | |
# bindkey "\\ep" history-beginning-search-backward-end | |
# bindkey "\\en" history-beginning-search-forward-end | |
# glob(*)によるインクリメンタルサーチ | |
# bindkey '^R' history-incremental-pattern-search-backward | |
# bindkey '^S' history-incremental-pattern-search-forward | |
# bindkey '^R' history-incremental-search-backward | |
# bindkey '^S' history-incremental-search-forward | |
# historyの共有 | |
setopt share_history | |
# 余分な空白は詰める | |
setopt hist_reduce_blanks | |
# コマンドラインの先頭がスペースで始まる場合ヒストリに追加しない | |
setopt hist_ignore_space | |
# add history when command executed. | |
setopt inc_append_history | |
# 補完時にヒストリを自動的に展開する | |
setopt hist_expand |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment