Skip to content

Instantly share code, notes, and snippets.

@yo-iida
Last active January 15, 2021 14:00
Show Gist options
  • Save yo-iida/49101793ed211af7afc2eec763e204e2 to your computer and use it in GitHub Desktop.
Save yo-iida/49101793ed211af7afc2eec763e204e2 to your computer and use it in GitHub Desktop.
zshrc
# rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# peco の設定
# % brew install peco
function peco-history-selection() {
BUFFER=`history -n 1 | tail -r | awk '!a[$0]++' | peco`
CURSOR=$#BUFFER
zle reset-prompt
}
zle -N peco-history-selection
bindkey '^R' peco-history-selection
bindkey '^[\e[C' forward-word
bindkey '^[\e[D' backward-word
# direnv
eval "$(direnv hook zsh)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment