zsh-users
 help / color / mirror / code / Atom feed
From: Grant Taylor <gtaylor@tnetconsulting.net>
To: zsh-users@zsh.org
Subject: Re: positioning of RPS1
Date: Sat, 24 Mar 2018 17:20:40 -0600	[thread overview]
Message-ID: <f454a5c8-a533-e302-3ea3-b69bd87533fd@spamtrap.tnetconsulting.net> (raw)
In-Reply-To: <111b6659-b7cd-7be7-3b59-cdb1be9c2f94@eastlink.ca>

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

On 03/24/2018 12:44 PM, Ray Andrews wrote:
> I remember reading something about zsh needing to calculate the actual 
> width of the promps but I can't find it.  Does someone have a fast fix, 
> or a reference in the docs?

I don't have a fast fix but I do recall what you're talking about.

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.



-- 
Grant. . . .
unix || die


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3982 bytes --]

  reply	other threads:[~2018-03-24 23:27 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 [this message]
2018-03-25 16:36 ` Ray Andrews
2018-03-25 18:42   ` Grant Taylor

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=f454a5c8-a533-e302-3ea3-b69bd87533fd@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).