Last active
October 29, 2017 10:58
-
-
Save lapis-zero09/5b202bbff8f15826ff2cc9e2d36a6efa to your computer and use it in GitHub Desktop.
This file contains hidden or 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 ghq-fzf() { | |
local selected_dir=$(ghq list | fzf --query="$LBUFFER") | |
if [ -n "$selected_dir" ]; then | |
BUFFER="cd $(ghq root)/${selected_dir}" | |
zle accept-line | |
fi | |
zle reset-prompt | |
} | |
zle -N ghq-fzf | |
bindkey "^g" ghq-fzf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment