Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: positioning of RPS1
- X-seq: zsh-users 23278
- From: Grant Taylor <gtaylor@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: positioning of RPS1
- Date: Sun, 25 Mar 2018 12:42:06 -0600
- Arc-authentication-results: i=1; tncsrv06.tnetconsulting.net; none
- Arc-filter: OpenARC Filter v0.1.0 tncsrv06.tnetconsulting.net w2PIfEhb018590
- Arc-message-signature: i=1; a=rsa-sha256; d=tnetconsulting.net; s=2015; t=1522003275; c=relaxed/simple; bh=yuyB7vvoJzVO3NpiUcV+6WswpM2N/QrY2SzuMeRXdDw=; h=DKIM-Signature:Subject:To:From:Message-ID:Date:User-Agent: MIME-Version:Content-Type; b=jw8vQc6w4vATE3HjMadSLEsUA70xXbQpJ94hO4UZBLx3Lw+39oSAaoO3evaj2rgVNfEoJBc0OCPDgTRO8WJwEK2OCCJpF+E4WUyNreQyOA7/k1g0vbXOKD6BPoYVyhGag3NPhDO5XaXJ5yP31MrmIFQLKU3dUARxw3gIOqvuacA=
- Arc-seal: i=1; a=rsa-sha256; d=tnetconsulting.net; s=2015; t=1522003275; cv=none; b=27PixxkydcJdFtOKw5sk6bdiJ3727Rqc1DENK7DjhnSt9NtD27Z7FGXivEqlP+cJaczTG7Xtr+QO9gkX/kWybSQxhZFlShIxORKuj9pDS2wwyJgePZsTNBhB+NskVdrA3gNPzKHJ7rHbrCx7JDfNV7Zv75Yszyt4DIdN68RfG3E=
- Authentication-results: tncsrv06.tnetconsulting.net; arc=none header.d=tnetconsulting.net
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=tnetconsulting.net; s=2015; t=1522003275; bh=yuyB7vvoJzVO3NpiUcV+6WswpM2N/QrY2SzuMeRXdDw=; h=Subject:To:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Cc:Content-Disposition: Content-Language:Content-Transfer-Encoding:Content-Type:Date:From: In-Reply-To:Message-ID:MIME-Version:References:Reply-To: Resent-Date:Resent-From:Resent-To:Resent-Cc:Sender:Subject:To: User-Agent; b=l5i+ZA/RwOyq2ICBOKZIQJ+RxtC/Bm8D/aWMkNID8yQW9KZPMclU7EkqnzTN0naZG 0xiLYFery9xkBAsP308qP+keaEzYpazQxFn9TwUAt641AWjPD8Zq/0hRWgGSpk1p9q nk+8++7YqP0UPjT+senILRxlYrkJ1JYXmwe0/DnE=
- In-reply-to: <0bc40f21-c104-4f11-1581-86a93adbfd62@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: TNet Consulting
- References: <111b6659-b7cd-7be7-3b59-cdb1be9c2f94@eastlink.ca> <0bc40f21-c104-4f11-1581-86a93adbfd62@eastlink.ca>
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:
smime.p7s
Description: S/MIME Cryptographic Signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author