akhayyat/dotfiles

zsh: theme: fix mercurial prompt

Commit 89a6785ebd11 · Ahmad Khayyat · 2022-12-02 21:36 +0300

Changeset
89a6785ebd11d493cc92054451887dc25b9d9eb4

View source at this commit

zsh: theme: fix mercurial prompt

- Remove redundant angle brackets
- Remove incoming and outgoing fragments (removed from hg-prompt)

Comments

No comments yet.

Log in to comment

Diff

diff --git a/zsh/themes/prompt_akhayyat_setup b/zsh/themes/prompt_akhayyat_setup
--- a/zsh/themes/prompt_akhayyat_setup
+++ b/zsh/themes/prompt_akhayyat_setup
@@ -42,29 +42,27 @@
     # Define prompts.
 
     # Prompt with Mercurial
-#     PROMPT="
-# %F{magenta}%n%f@%F{magenta}%m%f:%F{cyan}%~%f"'$(hg_prompt_1)${vcs_info_msg_0_}$(hg_prompt_2)$(virtualenv_prompt)$(rvm_prompt)
-# » '
+    PROMPT="
+%F{magenta}%n%f@%F{magenta}%m%f:%F{cyan}%~%f"'$(hg_prompt_1)${vcs_info_msg_0_}$(hg_prompt_2)$(virtualenv_prompt)$(rvm_prompt)
+» '
 
     # Prompt without Mercurial
-    PROMPT="
-%F{magenta}%n%f@%F{magenta}%m%f:%F{cyan}%~%f"'${vcs_info_msg_0_}$(virtualenv_prompt)$(rvm_prompt)
-» '
+#     PROMPT="
+# %F{magenta}%n%f@%F{magenta}%m%f:%F{cyan}%~%f"'${vcs_info_msg_0_}$(virtualenv_prompt)$(rvm_prompt)
+# » '
 
     RPROMPT="%B%F{black}%D{%Y.%m.%d %a  %I:%M %P}%f%b"
 }
 
 function hg_prompt_1 {
     hg prompt --angle-brackets "\
- <on ☿<%F{cyan}<root|basename>%f/>%F{yellow}<branch>%f>\
+ on ☿<%F{cyan}<root|basename>%f/>%F{yellow}<branch>%f\
 <:%F{$orange}<bookmark>%f>\
  at %F{green}<rev>%f\
 <:%F{green}<tags>%f>\
 <%F{$orange}<status|modified>%f>\
 <%F{red}<status|unknown>%f>\
-<update>\
-< %F{yellow}↑%f:%F{yellow}<outgoing|count>%f>\
-< %F{$orange}↓%f:%F{$orange}<incoming|count>%f>" 2>/dev/null
+<update>" 2>/dev/null
 }
 
 function hg_prompt_2 {
@@ -80,9 +78,7 @@
 <:%F{green}<tags>%f>\
 <%F{$orange}<status|modified>%f>\
 <%F{red}<status|unknown>%f>\
-<update>\
-< %F{yellow}↑%f<outgoing>>\
-< %F{$orange}↓%f<incoming>>" 2>/dev/null)
+<update>" 2>/dev/null)
     fi
 
     echo $mq