summaryrefslogtreecommitdiff
path: root/themes/rkj-repos.zsh-theme
diff options
context:
space:
mode:
authorChaosInventor <chaosinventor@yandex.com>2024-01-08 11:02:20 +0100
committerGitHub <noreply@github.com>2024-01-08 11:02:20 +0100
commit5ea2c68be88452b33b35ba8004fc9094618bcd87 (patch)
tree21ece49a9cd9810b42fd67239db106ed9271772f /themes/rkj-repos.zsh-theme
parent428866e28def25593e7dd73f1c3bd909db47635b (diff)
downloadzsh-5ea2c68be88452b33b35ba8004fc9094618bcd87.tar.gz
zsh-5ea2c68be88452b33b35ba8004fc9094618bcd87.tar.bz2
zsh-5ea2c68be88452b33b35ba8004fc9094618bcd87.zip
fix(rkj-repos): check if `~/.hgrc` exists (#12148)
Diffstat (limited to 'themes/rkj-repos.zsh-theme')
-rw-r--r--themes/rkj-repos.zsh-theme2
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme
index 3cb452335..a9fe1a9af 100644
--- a/themes/rkj-repos.zsh-theme
+++ b/themes/rkj-repos.zsh-theme
@@ -1,7 +1,7 @@
# user, host, full path, and time/date on two lines for easier vgrepping
function hg_prompt_info {
- if (( $+commands[hg] )) && grep -q "prompt" ~/.hgrc; then
+ if (( $+commands[hg] )) && [[ -e ~/.hgrc ]] && grep -q "prompt" ~/.hgrc; then
hg prompt --angle-brackets "\
<hg:%{$fg[magenta]%}<branch>%{$reset_color%}><:%{$fg[magenta]%}<bookmark>%{$reset_color%}>\
</%{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\