Last active
June 8, 2021 03:28
-
-
Save tsub/4448666a276b088bce3f19005f512c15 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
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 "^]" ghq-fzf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment