]> git.madduck.net Git - etc/zsh.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

allow %# to be replaced with psvar[4] if set
authormartin f. krafft <madduck@madduck.net>
Thu, 8 Mar 2018 09:19:48 +0000 (13:19 +0400)
committermartin f. krafft <madduck@madduck.net>
Thu, 8 Mar 2018 09:19:48 +0000 (13:19 +0400)
.zsh/themes/prompt_madduck_setup

index 3f0f3e5c9a4082d58750b1e376da90e0b9955fab..c9a04bc251f3cc3ec0316efe51178adccceb57d1 100644 (file)
@@ -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)