Skip to content

Instantly share code, notes, and snippets.

@macoshita
Last active April 26, 2026 23:50
Show Gist options
  • Select an option

  • Save macoshita/6ee6066c84cffa0d0b719fe2583aa7b2 to your computer and use it in GitHub Desktop.

Select an option

Save macoshita/6ee6066c84cffa0d0b719fe2583aa7b2 to your computer and use it in GitHub Desktop.
zsh-ghq-fzf.zsh
function ghq-fzf() {
local target_dir=$(ghq list -p | fzf --query="$LBUFFER")
if [ -n "$target_dir" ]; then
BUFFER="cd ${target_dir}"
zle accept-line
fi
zle reset-prompt
}
zle -N ghq-fzf
stty -ixon
bindkey "^Q" ghq-fzf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment