mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
Simplify the prompt
In order to mimic git prompt, simply use the prefix and suffix variables.
This commit is contained in:
parent
e3977e439c
commit
88a98b3fd9
1 changed files with 1 additions and 2 deletions
|
|
@ -62,8 +62,7 @@ function hg_get_branch_name() {
|
|||
function hg_prompt_info {
|
||||
local branch=$(hg_get_branch_name)
|
||||
if [[ $branch != "" ]]; then
|
||||
echo "$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_HG_PROMPT_PREFIX\
|
||||
$ZSH_THEME_REPO_NAME_COLOR${branch}$ZSH_PROMPT_BASE_COLOR$ZSH_PROMPT_BASE_COLOR$(hg_dirty)$ZSH_THEME_HG_PROMPT_SUFFIX$ZSH_PROMPT_BASE_COLOR"
|
||||
echo "$ZSH_THEME_HG_PROMPT_PREFIX${branch}$(hg_dirty)$ZSH_THEME_HG_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue