mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-01-20 19:03:58 +08:00
[bobthefish] Don't break when hg/git not found
This commit is contained in:
parent
30ac04ceda
commit
5104ef35f4
|
@ -68,11 +68,11 @@ set __bobthefish_lt_blue 326D9E
|
||||||
# ===========================
|
# ===========================
|
||||||
|
|
||||||
function __bobthefish_in_git -d 'Check whether pwd is inside a git repo'
|
function __bobthefish_in_git -d 'Check whether pwd is inside a git repo'
|
||||||
command git rev-parse --is-inside-work-tree >/dev/null 2>&1
|
command which git > /dev/null 2>&1; and command git rev-parse --is-inside-work-tree >/dev/null 2>&1
|
||||||
end
|
end
|
||||||
|
|
||||||
function __bobthefish_in_hg -d 'Check whether pwd is inside a hg repo'
|
function __bobthefish_in_hg -d 'Check whether pwd is inside a hg repo'
|
||||||
command hg root > /dev/null 2>&1
|
command which hg > /dev/null 2>&1; and command hg stat > /dev/null 2>&1
|
||||||
end
|
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)'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user