Skip to content

Instantly share code, notes, and snippets.

@kentaro
Created June 2, 2014 12:05
Show Gist options
  • Save kentaro/c3b508d7084cf74d69ff to your computer and use it in GitHub Desktop.
Save kentaro/c3b508d7084cf74d69ff to your computer and use it in GitHub Desktop.
source percol/src.zsh
bindkey '^S' percol-src
function percol-src () {
local selected_dir=$(ghq list --full-path | percol --query "$LBUFFER")
if [ -n "$selected_dir" ]; then
BUFFER="cd ${selected_dir}"
zle accept-line
fi
zle clear-screen
}
zle -N percol-src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment