Created
June 2, 2014 12:05
-
-
Save kentaro/c3b508d7084cf74d69ff 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 percol/src.zsh | |
bindkey '^S' percol-src |
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
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