Commit a3b40112 authored by Roman Inflianskas's avatar Roman Inflianskas Committed by Bruno Pinto

bobthefish: hg: faster checking for hg repo (fix)

Conflicts:
	themes/bobthefish/fish_prompt.fish
parent 8b2b0ac5
...@@ -75,6 +75,17 @@ set __bobthefish_lt_brown BF5E00 ...@@ -75,6 +75,17 @@ set __bobthefish_lt_brown BF5E00
# command which hg > /dev/null 2>&1; and command hg stat > /dev/null 2>&1 # command which hg > /dev/null 2>&1; and command hg stat > /dev/null 2>&1
# end # end
function __bobthefish_check_hg_dir_recursively -d 'Check whether pwd or parents contain .hg dir'
set d (pwd)
while not [ $d = / ]
if test -e $d/.hg
return 0
end
set d (dirname $d)
end
return 1
end
function __bobthefish_git_branch -d 'Get the current git branch (or commitish)' function __bobthefish_git_branch -d 'Get the current git branch (or commitish)'
set -l ref (command git symbolic-ref HEAD ^/dev/null) set -l ref (command git symbolic-ref HEAD ^/dev/null)
if [ $status -gt 0 ] if [ $status -gt 0 ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment