Merge branch 'feat/add-chezmoi-prompt' of https://github.com/Alkindi42/powerlevel10k into Alkindi42-feat/add-chezmoi-prompt

This commit is contained in:
Roman Perepelitsa 2023-06-11 08:14:06 +02:00
commit 416bdf1ca3
8 changed files with 51 additions and 0 deletions

View file

@ -4260,6 +4260,21 @@ instant_prompt_vi_mode() {
fi
}
################################################################
# Segment to display chezmoi information.
# More information: https://www.chezmoi.io/
prompt_chezmoi() {
_p9k_prompt_segment "$0" "black" "white" 'CHEZMOI_ICON' 0 '' "chezmoi"
}
_p9k_prompt_chezmoi_init() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$CHEZMOI'
}
function instant_prompt_chezmoi() {
_p9k_prompt_segment prompt_chezmoi "black" "white" CHEZMOI_ICON 0 '' 'chezmoi'
}
################################################################
# Virtualenv: current working virtualenv
# More information on virtualenv (Python):