mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
__fish_hg_prompt: Remove explicit root check again
This doesn't add anything except slowing the function down by about 33%. Checking for a branch is just as good and that is displayed in the prompt anyway.
This commit is contained in:
parent
7376639789
commit
8eccf8a6f7
1 changed files with 1 additions and 5 deletions
|
@ -27,12 +27,8 @@ function __fish_hg_prompt --description 'Write out the hg prompt'
|
|||
return 1
|
||||
end
|
||||
|
||||
# If we're not in an hg repository, bail
|
||||
if not hg root >/dev/null ^/dev/null
|
||||
return 0
|
||||
end
|
||||
|
||||
set -l branch (hg branch ^/dev/null)
|
||||
# If there's no branch, there's no repository
|
||||
if test -z $branch
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue