|
Server IP : 161.35.85.9 / Your IP : 216.73.217.138 Web Server : nginx/1.30.4 System : Linux cheapdeb-ams3 7.1.13+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 7.1.13-1 (2026-09-03) x86_64 User : root ( 0) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/fish/functions/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
function fish_print_hg_root
# If hg isn't installed, there's nothing we can do
if not command -sq hg
return 1
end
# Find an hg directory above $PWD
# without calling `hg root` because that's too slow
set -l root
set -l dir "$(pwd -P 2>/dev/null)"
or return 1
while not contains -- "$dir" "" / .
if test -f $dir'/.hg/dirstate'
echo $dir/.hg
return 0
end
# Go up one directory
set dir (path dirname -- $dir)
end
return 1
end