Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Wish for rprompt feature



Reading the User's Guide again[1] an idea came to my mind that would
compensate for an inability of the current implementation of the
"right prompt":

I have my pwd ("%~") in my RPROMPT (as probably many people). When the
path to the pwd is long (or I type a long command line) the rprompt
disappears and makes place for my typing.

This is a feature and generally a good thing but the problem is that
the /whole/ rprompt disappears and not just the space I need.

Just a "picture" for what I would like:

current:
thorsten@galactus% 12345678 /cygdrive/g/home/thorsten/ifolder/gentoo/conf/kernel
thorsten@galactus% 123456789

desired:
thorsten@galactus% 12345678 /cygdrive/g/home/thorsten/ifolder/gentoo/conf/kernel
thorsten@galactus% 123456789 [...]/g/home/thorsten/ifolder/gentoo/conf/kernel
thorsten@galactus% 1234567890  [...]/home/thorsten/ifolder/gentoo/conf/kernel

Is that already possible? Or an easy to implement case for the
wishlist?

Thanks,
Thorsten

[1] "Prompts or parts of prompts, not just bits showing the directory,
can be truncated to any length you choose. To truncate a path on the
left, use something like ʽ%10<...<%~ʼ. That works like this: the
ʽ%<<ʼ is the basic form for truncation. The 10 after the ʽ%ʼ says
that anything following is limited to 10 characters, and the
characters ʽ...ʼ are to be displayed whenever the prompt would
otherwise be longer than that (you can leave this empty). This
applies to anything following, so now the %~ canʼt be longer than 10
characters, otherwise it will be truncated (to 7 characters, once the
ʽ...ʼ has been printed)."



Messages sorted by: Reverse Date, Date, Thread, Author