From: Grant Taylor <gtaylor@tnetconsulting.net>
To: zsh-users@zsh.org
Subject: Re: positioning of RPS1
Date: Sun, 25 Mar 2018 12:42:06 -0600 [thread overview]
Message-ID: <c0e54860-269b-7db9-e7a4-2e348be008f2@spamtrap.tnetconsulting.net> (raw)
In-Reply-To: <0bc40f21-c104-4f11-1581-86a93adbfd62@eastlink.ca>
[-- Attachment #1: Type: text/plain, Size: 997 bytes --]
On 03/25/2018 10:36 AM, Ray Andrews wrote:
> I think the trick was to put non-printing characters (like escape
> sequences) inside of "%{…}" sequences. That tells Zsh not to use
> characters in that sequence as printable characters when calculating the
> prompt width. I believe the same thing applies to both PROMPT and RPROMPT.
Thank you for the confirmation.
> Thanks Grant, that's what I was hunting for: %{ ... %}. Interesting that
> it effects RPS1, I'd have thought that it sorta just attaches itself to
> the right margin and that the width of PS1 wouldn't matter to it that
> much, but I suppose that's naive, the entire prompt is worked out in
> one calculation.
You're welcome. I'm glad that you got it working.
Depending on window width, prompt & command length, Zsh will remove the
RPROMPT when the command gets too close. As such Zsh needs to know the
printed width of the RPROMPT just like the (L)PROMPT.
--
Grant. . . .
unix || die
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3982 bytes --]
prev parent reply other threads:[~2018-03-25 18:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-24 18:44 Ray Andrews
2018-03-24 23:20 ` Grant Taylor
2018-03-25 16:36 ` Ray Andrews
2018-03-25 18:42 ` Grant Taylor [this message]
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=c0e54860-269b-7db9-e7a4-2e348be008f2@spamtrap.tnetconsulting.net \
--to=gtaylor@tnetconsulting.net \
--cc=zsh-users@zsh.org \
/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).