From 6740f08f61395665714fbba150c82e99ffe0e784 Mon Sep 17 00:00:00 2001 From: Alkindi42 Date: Thu, 18 May 2023 11:57:40 +0200 Subject: [PATCH] chezmoi: add chezmoi prompt --- internal/p10k.zsh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index a3541bac..dea5e26d 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4260,6 +4260,17 @@ instant_prompt_vi_mode() { fi } +################################################################ +# Segment to display chezmoi information. +# More information: https://www.chezmoi.io/ +prompt_chezmoi() { + _p9k_prompt_segment "$0" "blue" "$_p9k_color1" '' 0 '' "chezmoi" +} + +_p9k_prompt_chezmoi_init() { + typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='$CHEZMOI' +} + ################################################################ # Virtualenv: current working virtualenv # More information on virtualenv (Python):