Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (9 sloc) 239 Bytes
function peco-src() {
local selected_dir=$(ghq list | peco --query "$LBUFFER")
if [ -n "$selected_dir" ]; then
BUFFER="cd ${GOPATH}/src/${selected_dir}"
zle accept-line
fi
zle clear-screen
}
zle -N peco-src