5ea2c68be88452b33b35ba8004fc9094618bcd87
- Author
- ChaosInventor <chaosinventor@yandex.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
fix(rkj-repos): check if `~/.hgrc` exists (#12148)
Diff
1diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme
2index 3cb452335d067c3e682f2cd2cb9721d106fe3d8b..a9fe1a9af0a7fda6bcfb29d75bfe9e8ab37c9484 100644
3--- a/themes/rkj-repos.zsh-theme
4+++ b/themes/rkj-repos.zsh-theme
5@@ -1,7 +1,7 @@
6 # user, host, full path, and time/date on two lines for easier vgrepping
7
8 function hg_prompt_info {
9- if (( $+commands[hg] )) && grep -q "prompt" ~/.hgrc; then
10+ if (( $+commands[hg] )) && [[ -e ~/.hgrc ]] && grep -q "prompt" ~/.hgrc; then
11 hg prompt --angle-brackets "\
12 <hg:%{$fg[magenta]%}<branch>%{$reset_color%}><:%{$fg[magenta]%}<bookmark>%{$reset_color%}>\
13 </%{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\