diff options
Diffstat (limited to 'plugins/branch')
-rw-r--r-- | plugins/branch/branch.plugin.zsh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/branch/branch.plugin.zsh b/plugins/branch/branch.plugin.zsh index a1e9ca31b..2e5659bdf 100644 --- a/plugins/branch/branch.plugin.zsh +++ b/plugins/branch/branch.plugin.zsh @@ -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 :) |