From 3e4bdf51d42ad1e9c2bcaac007e9023ff7206250 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 6 Oct 2018 16:53:02 -0700 Subject: [PATCH] Teach hg prompt to use pwd -P The hg prompt walks up the directory hierarchy to decide if we are in a repo subdirectory. Because hg is an external command, it resolves symlinks. Switch to using pwd -P so hg and fish will have the same view of the hg repo. Based on comment: https://github.com/fish-shell/fish-shell/pull/5190#issuecomment-421912360 --- share/functions/__fish_hg_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/__fish_hg_prompt.fish b/share/functions/__fish_hg_prompt.fish index 21f6eaf7a..ee71d305f 100644 --- a/share/functions/__fish_hg_prompt.fish +++ b/share/functions/__fish_hg_prompt.fish @@ -30,7 +30,7 @@ function __fish_hg_prompt --description 'Write out the hg prompt' # Find an hg directory above $PWD # without calling `hg root` because that's too slow set -l root - set -l dir $PWD + set -l dir (pwd -P) while test $dir != "/" if test -f $dir'/.hg/dirstate' set root $dir"/.hg"