diff options
author | Von Random <von@vdrandom.org> | 2023-03-17 19:00:07 +0200 |
---|---|---|
committer | Von Random <von@vdrandom.org> | 2023-03-17 19:00:07 +0200 |
commit | 9339c7a5349d2d6a07d6fd9236a7ac1cedb12968 (patch) | |
tree | 10114d275c7a1cd067f768f95d1bed20aeb0894c | |
parent | 6290bd1624a5ba65cecbef4d690a2cb7a39d7462 (diff) |
fish: fix groot function to fail quietly
-rw-r--r-- | cli/.config/fish/functions/groot.fish | 2 |
1 files changed, 2 insertions, 0 deletions
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 |