Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in RPROMPT alighnment
- X-seq: zsh-workers 50734
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Dan Neal <dan.r.neal@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: Bug in RPROMPT alighnment
- Date: Tue, 4 Oct 2022 10:32:49 +0200
- Archived-at: <https://zsh.org/workers/50734>
- In-reply-to: <CAB2849toXc23ihzk=Fmx3ER==o5My7_Fu=ye0yMMhtWXbUN+Bw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAB2849toXc23ihzk=Fmx3ER==o5My7_Fu=ye0yMMhtWXbUN+Bw@mail.gmail.com>
On 10/4/22, Dan Neal <dan.r.neal@xxxxxxxxx> wrote:
> When a hyperlink is included in the RPROMPT, zsh mistakenly thinks the
> RPROMPT is longer than it actually is. This results in the RPROMPT not
> being aligned all the way to the right but floats further to the middle.
>
> A minimal .zshrc demonstrating the bug:
> ```
> RPROMPT=$(eval "echo '\e]8;;http://example.com\aThis is a link\e]8;;\a'")
> ```
>
> The hyperlink specification is here:
> https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
>
> Please feel free to email me or cc me with any followup.
You need to use %{ and %} around non-printable escape sequences in your prompt.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author