mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
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
This commit is contained in:
parent
0f0bb1e10f
commit
3e4bdf51d4
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue