From: Mark Wooding Date: Wed, 23 May 2018 13:42:22 +0000 (+0100) Subject: dot/zshrc: Fix path ellipsization in the prompt. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/3fa9aa2502686aa90b4d55a1a980eca00f4cc5c1 dot/zshrc: Fix path ellipsization in the prompt. 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. --- diff --git a/dot/zshrc b/dot/zshrc index f6b205a..bf32bf9 100644 --- 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 }