From c0129fde26e3d2e6caced774d4a457a905b32d63 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 8 Mar 2018 13:19:48 +0400 Subject: [PATCH 1/1] allow %# to be replaced with psvar[4] if set --- .zsh/themes/prompt_madduck_setup | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.zsh/themes/prompt_madduck_setup b/.zsh/themes/prompt_madduck_setup index 3f0f3e5..c9a04bc 100644 --- a/.zsh/themes/prompt_madduck_setup +++ b/.zsh/themes/prompt_madduck_setup @@ -338,10 +338,11 @@ function make_ps1() { # now comes the working directory, composed from parts in $psvar, # which is managed by $ZDOTDIR/zshrc/06-vcsprompt - echo -n '%1v%(2v.|%B%2v%b|.)%(3v.%3v.)' + echo -n '%1v%(2V.|%B%2v%b|.)%(3V.%3v.)' - # and we finish with #/% for root/non-root, and a space - echo -n '%# ' + # and we finish with #/% for root/non-root, unless psvar[4] is set, and + # a space + echo -n "%(4V.%4v.%#) " echo } PS1=$(make_ps1) -- 2.39.5