Improved mercurial prompt

This commit is contained in:
HimDek 2022-05-29 08:28:15 +05:30
commit c2ef915921
2 changed files with 71 additions and 43 deletions

View file

@ -52,10 +52,18 @@ plugins=(... mercurial)
You can also redefine additional vars used in the plugin (after Oh My Zsh is sourced):
```zsh
ZSH_THEME_HG_PROMPT_PREFIX="%{$fg_bold[magenta]%}hg:(%{$fg[red]%}"
ZSH_THEME_HG_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_HG_PROMPT_DIRTY="%{$fg[magenta]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_HG_PROMPT_CLEAN="%{$fg[magenta]%})"
ZSH_THEME_HG_PROMPT_PREFIX="("
ZSH_THEME_HG_PROMPT_SUFFIX=")"
ZSH_THEME_HG_PROMPT_SEPARATOR="|"
ZSH_THEME_HG_PROMPT_BRANCH="%{$fg_bold[magenta]%}"
ZSH_THEME_HG_PROMPT_BEHIND="%{↓%G%}"
ZSH_THEME_HG_PROMPT_AHEAD="%{↑%G%}"
ZSH_THEME_HG_PROMPT_MODIFIED="%{$fg[red]%}%{●%G%}"
ZSH_THEME_HG_PROMPT_ADDED="%{$fg[blue]%}%{✚%G%}"
ZSH_THEME_HG_PROMPT_REMOVED="%{$fg[red]%}%{✖%G%}"
ZSH_THEME_HG_PROMPT_DELETED="%{$fg[red]%}%{🗑️%G%}"
ZSH_THEME_HG_PROMPT_UNKNOWN="%{$fg[cyan]%}%{…%G%}"
ZSH_THEME_HG_PROMPT_CLEAN="%{$fg_bold[green]%}%{✔%G%}"
```
### Display repo branch and directory status in prompt