From 9339c7a5349d2d6a07d6fd9236a7ac1cedb12968 Mon Sep 17 00:00:00 2001 From: Von Random Date: Fri, 17 Mar 2023 19:00:07 +0200 Subject: [PATCH] fish: fix groot function to fail quietly --- cli/.config/fish/functions/groot.fish | 2 ++ 1 file changed, 2 insertions(+) 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