mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-24 04:29:25 +02:00
After 'hg init' command, sometimes Mercurial do not create .hg/branch file so we'll take 'default' as fallback.
This commit is contained in:
parent
d310fac7f6
commit
388b185862
1 changed files with 6 additions and 1 deletions
|
|
@ -17,7 +17,12 @@ function branch_prompt_info() {
|
|||
# Mercurial repository
|
||||
if [[ -d "${current_dir}/.hg" ]]
|
||||
then
|
||||
echo '☿' $(<"$current_dir/.hg/branch")
|
||||
if [[ -f "$current_dir/.hg/branch" ]]
|
||||
then
|
||||
echo '☿' $(<"$current_dir/.hg/branch")
|
||||
else
|
||||
echo '☿ default'
|
||||
fi
|
||||
return;
|
||||
fi
|
||||
# Defines path as parent directory and keeps looking for :)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue