diff options
author | cori schlegel <46317+cori@users.noreply.github.com> | 2018-04-15 08:48:31 -0500 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-04-15 15:48:31 +0200 |
commit | fa93ea0d75c5079407862c3bbb48d2131577cd5d (patch) | |
tree | ba031865c4fd2faac6770af514a0d8da327c8bca /themes/rkj-repos.zsh-theme | |
parent | aa5279f2dc2502d13ae0e7d2fa8647db833e31f1 (diff) | |
download | zsh-fa93ea0d75c5079407862c3bbb48d2131577cd5d.tar.gz zsh-fa93ea0d75c5079407862c3bbb48d2131577cd5d.tar.bz2 zsh-fa93ea0d75c5079407862c3bbb48d2131577cd5d.zip |
[rkj-repos] Check for 'hg prompt' and exit if not found (#6655)
* Check for extension, and exit if not found. Addresses #6036
* Fix styles in rkj-repos.theme
Diffstat (limited to 'themes/rkj-repos.zsh-theme')
-rw-r--r-- | themes/rkj-repos.zsh-theme | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme index ba2a0dba6..0d5a166ba 100644 --- a/themes/rkj-repos.zsh-theme +++ b/themes/rkj-repos.zsh-theme @@ -1,6 +1,9 @@ -# user, host, full path, and time/date -# on two lines for easier vgrepping -# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +# user, host, full path, and time/date on two lines for easier vgrepping + +if ! grep -q "prompt" ~/.hgrc; then + echo "This theme requires 'hg prompt' (https://bitbucket.org/sjl/hg-prompt/overview)" + return 1 +fi function hg_prompt_info { hg prompt --angle-brackets "\ @@ -33,4 +36,3 @@ function retcode() {} PROMPT=$'%{$fg_bold[blue]%}┌─[%{$fg_bold[green]%}%n%b%{$fg[black]%}@%{$fg[cyan]%}%m%{$fg_bold[blue]%}]%{$reset_color%} - %{$fg_bold[blue]%}[%{$fg_bold[white]%}%~%{$fg_bold[blue]%}]%{$reset_color%} - %{$fg_bold[blue]%}[%b%{$fg[yellow]%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{$fg_bold[blue]%}] %{$fg_bold[blue]%}└─[%{$fg_bold[magenta]%}%?$(retcode)%{$fg_bold[blue]%}] <$(mygit)$(hg_prompt_info)>%{$reset_color%} ' PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' - |