1
0
Fork 0

fish: fix groot function to fail quietly

This commit is contained in:
Von Random 2023-03-17 19:00:07 +02:00
parent 6290bd1624
commit 9339c7a534

View file

@ -1,4 +1,6 @@
function groot 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) set -l root (command git rev-parse --show-toplevel)
test $status -eq 0 && cd $root test $status -eq 0 && cd $root
end end