zsh-users
 help / color / mirror / code / Atom feed
From: Thorsten Kampe <thorsten@thorstenkampe.de>
To: zsh-users@sunsite.dk
Subject: Wish for rprompt feature
Date: Fri, 19 Mar 2004 12:41:06 +0100	[thread overview]
Message-ID: <cmy4g3am024u$.dlg@thorstenkampe.de> (raw)

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)."


             reply	other threads:[~2004-03-19 11:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19 11:41 Thorsten Kampe [this message]
2004-03-20 17:10 ` Bart Schaefer
2004-03-20 18:12   ` Thorsten Kampe
2004-03-21  1:29     ` Bart Schaefer
2004-03-24 20:25       ` Thorsten Kampe
2004-03-25  3:07         ` Bart Schaefer
2004-03-20 19:28   ` Wayne Davison
2004-03-21  0:00     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='cmy4g3am024u$.dlg@thorstenkampe.de' \
    --to=thorsten@thorstenkampe.de \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).