zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: positioning of RPS1
Date: Sun, 25 Mar 2018 09:36:11 -0700	[thread overview]
Message-ID: <0bc40f21-c104-4f11-1581-86a93adbfd62@eastlink.ca> (raw)
In-Reply-To: <111b6659-b7cd-7be7-3b59-cdb1be9c2f94@eastlink.ca>

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.


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.


  parent reply	other threads:[~2018-03-25 17:06 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 [this message]
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=0bc40f21-c104-4f11-1581-86a93adbfd62@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --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).