Created
July 31, 2024 01:08
-
-
Save y16ra/72c318a6dc4af33543293854d229c01f to your computer and use it in GitHub Desktop.
navigates to the directory of a repository listed by the `ghq` command using `fzf`.
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 fzf-src(){ | |
local src=$(ghq list --full-path | fzf --query "$LBUFFER" --layout=reverse) | |
if [ -n "$src" ]; then | |
BUFFER="cd $src" | |
zle accept-line | |
fi | |
zle -R -c | |
} | |
zle -N fzf-src | |
bindkey '^]' fzf-src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment