Files
skel/dotfiles/config/fish/functions/cdgr.fish
David Tomaschik 9ab1f9c298 Misc updates
2026-02-18 16:10:06 -08:00

9 lines
217 B
Fish

# Change to the root of the git repository.
# If not in a git repo, do nothing.
function cdgr
set git_root (git rev-parse --show-toplevel 2>/dev/null)
if test -n "$git_root"
cd "$git_root"
end
end