From aa6a8e3c1d12d081fb6417eee8fe1a470e9cba72 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 28 Jan 2018 19:45:53 -0800 Subject: [PATCH] Stop looking for .hg when we hit root We used to do this, in a different way, but let's make it super explicit. Fixes #127 --- fish_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index a377dc8..98301f3 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -163,12 +163,12 @@ function __bobthefish_hg_project_dir -S -d 'Print the current hg project base di and return set -l d $PWD - # Must check whether `$d = /` if using native dirname while not [ -z "$d" ] if [ -e $d/.hg ] command hg root --cwd "$d" ^/dev/null return end + [ "$d" = '/' ]; and return set d (__bobthefish_dirname $d) end end