Created
September 16, 2025 04:34
-
-
Save uchida/8eaae119fa46340f87c2fe893e4367cd 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 ghd() { | |
local root=$(ghq root) | |
local selected=$( | |
ghq list | while read repo; do | |
local repo_path="$root/$repo" | |
local score=$( | |
(zoxide query --score "$repo_path" 2>/dev/null || echo 0) | | |
awk '{print $1}' | |
) | |
echo "$score $repo" | |
done | sort -rn | cut -d ' ' -f 2- | fzf) | |
if [[ -n "$selected" ]]; then | |
cd "$root/$selected" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment