Skip to content

Instantly share code, notes, and snippets.

@tuki0918
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save tuki0918/f46b854114019470f57f to your computer and use it in GitHub Desktop.

Select an option

Save tuki0918/f46b854114019470f57f to your computer and use it in GitHub Desktop.
zsh -> oh-my-zsh -> peco
ZSH_THEME="bureau"
# peco
function peco_select_history() {
local tac
if which tac > /dev/null; then
tac="tac"
else
tac="tail -r"
fi
BUFFER=$(fc -l -n 1 | eval $tac | peco --query "$LBUFFER")
CURSOR=$#BUFFER
zle -R -c
}
zle -N peco_select_history
bindkey '^R' peco_select_history
{
"Keymap": {
"C-p": "peco.SelectPrevious",
"C-n": "peco.SelectNext",
"C-c": "peco.Cancel"
}
}

zsh/oh-my-zsh install

brew install zsh
curl -L http://install.ohmyz.sh | sh

peco install

brew tap peco/peco
brew install peco
@tuki0918

Copy link
Copy Markdown
Author

~/.peco/config.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment