Last active
April 26, 2026 23:50
-
-
Save macoshita/6ee6066c84cffa0d0b719fe2583aa7b2 to your computer and use it in GitHub Desktop.
zsh-ghq-fzf.zsh
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 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