diff --git a/cli/.config/fish/functions/groot.fish b/cli/.config/fish/functions/groot.fish index 39dff47..18745f4 100644 --- a/cli/.config/fish/functions/groot.fish +++ b/cli/.config/fish/functions/groot.fish @@ -1,4 +1,6 @@ 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