Can zsh set the prompt to the whole path except the current dir? I.e. for ~/a/b/c/
to just ~/a/b/
?
I'm trying to get this result for ~/a/b/c
with left & right prompts:
c/: | ~/a/b/
as opposed to my current duplicated c
:
c/: | ~/a/b/c/
The duplication wastes space if the c
dir name is long.
In the manual I found everything else than what i want:
%-1~
- the first element of the path%1~
- the last element of the path
instead of all except the last
How can it be done?