chiark / gitweb /
dot/zshrc: Fix path ellipsization in the prompt.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 23 May 2018 13:42:22 +0000 (14:42 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 23 May 2018 13:42:22 +0000 (14:42 +0100)
At exactly six directories down, the ellipsization kicked in and
inserted a pointless `/.../' ellipsis which didn't actually replace a
segment of the real path.  Fix this by leaving one fewer step on
the right when ellipsizing.

Also, `ellipsize' is a horrid word.

dot/zshrc

index f6b205a0131995bb134575189648fecb26e241e5..bf32bf93e2f5a36ecee012a22ff3af385084204f 100644 (file)
--- a/dot/zshrc
+++ b/dot/zshrc
@@ -17,7 +17,7 @@ __mdw_set_prompt_hacks () {
       gitcolour=%F{cyan} rccolour=%F{red} uncolour=%f
       ;;
   esac
-  host=%m dir=" %(6~!%-1~/.../%5~!%~)"
+  host=%m dir=" %(6~!%-1~/.../%4~!%~)"
   more=%F{green}%_%f
 }