Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [tip] mouse support
- X-seq: zsh-users 8206
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Zsh users list <zsh-users@xxxxxxxxxx>
- Subject: Re: [tip] mouse support
- Date: Thu, 11 Nov 2004 18:22:25 +0000
- In-reply-to: <Pine.LNX.4.61.0411110943030.30994@xxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Zsh users list <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20041111122011.GB4451@sc> <4483.1100184032@xxxxxxx> <20041111162209.GC4451@sc> <Pine.LNX.4.61.0411110943030.30994@xxxxxxxxxxxxxxxxxx>
On Thu, Nov 11, 2004 at 09:47:02AM -0800, Bart Schaefer wrote:
> On Thu, 11 Nov 2004, Stephane Chazelas wrote:
>
> > In that new one, I tried to address the tab/newline issue.
> > It tries to calculate the length of the last line of the prompt,
> > it may fail if PS1 contains %%s or %{ %{ ... %} %} or if two
> > consecutive expansions of PS1 may not generate the same thing
>
> There's some code in Functions/Prompts/prompt_bart_setup in the function
> prompt_bart_precmd that computes the width of prompt strings. It's been
> specialized to expect to compute only the width of the first line of a
> two-line PS1, but it shouldn't be hard to adapt.
Well the (%%) expansion flag has another problem:
var='%Sfoo%s'
PS1='$var'
In that case, you need to expand first the variables in PS1 or
you'll miss the %S %s visual sequences.
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author