Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: 4.0.2: rprompt2 variable



Derek Peschel wrote:

> and reason that if the line is going to get too long, it should just
> stop growing.  So leaving the feature out on principle seems a bit
> presumptuous to me (especially since it was easy to add and didn't use
> very much code).

I'm happy with that argument. And thinking about it, I agree that there
might be uses - RPS2='<%6(_,%2^ ... %-2^,%^)' might be used to avoid
the state list getting too long.

> Would it be possible to do the reversal using the precmd feature?  (Can
> you "print" the prompt to a string?)  If so, then the %^ escape can go.
> And that makes more sense as the code to take out, since none of the
> other escapes has a "reverse order" feature.

It seems that precmd is only run before each PS1 prompt so the answer
to the question is no. Of course, we could change that or add a precmd2
but I'm not sure there would be much point. My vote is for sticking
with %^ because it is likely to be commonly used in RPS2.

Peter wrote:

> You might as well commit it.  I don't think anyone's going to mind.

Okay, I will.

Derek wrote:

> The behavior affects the released 4.0.2, as well as today's daily 4.1
> snapshot.  I haven't tested 4.0.4 (it seems not to compile on my system)
> but undoubtedly it works the same way.

What is the compiler error or whatever with 4.0.4? What type of system
is it?

Oliver

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________



Messages sorted by: Reverse Date, Date, Thread, Author