1
0
Fork 0
vdotfiles/cli/.config/fish/functions/groot.fish
2023-03-17 19:00:07 +02:00

6 lines
240 B
Fish

function groot
set -l is_git_worktree (command git rev-parse --is-inside-work-tree)
string match -qe 'true' "$is_git_worktree" || return
set -l root (command git rev-parse --show-toplevel)
test $status -eq 0 && cd $root
end