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

Re: PATCH: 4.0.2: rprompt2 variable



Derek Peschel wrote:
> 
> Even if a feature (right-hand prompts) is frivolous, it might as well be
> available in general.
> 
> Now you can see the parser state (or whatever else you might want to put
> in PROMPT2) and still have a consistent left margin when entering a multi-
> line command.  See my companion "reverse parser state" patch if you want
> the parser state to expand leftward on your screen.
> 
> Comments welcome (I just started using zsh and I have no idea if anyone
> else will find these patches useful).

I'd just like to say that I like this. I've never actually used
rprompts but this with the transient_rprompt option (new since 4.0.2)
is useful. For one thing, it makes life easier if I decide to cut 'n'
paste the lines into an editor or other terminal because I don't then
have a prompt to get rid of. I fear that other people may want a
separate transient_rprompt2 option with this.

> %_ no longer treats negative integers like zero, but instead extracts
> leading (outermost) words.  Maybe someone somewhere cares more about
> the outer state than the inner state.
> 
> %^ works like %_ (including the behavior described above) but after
> the words are selected they are printed in reverse order.  Try using %^
> in RPS2.
> 
> I picked ^ because it comes before _ in ASCII.

I'm not sure whether the negative integers part might ever be useful
though I have no objections because it is logical. I'd be tempted to
use negative numbers for reversing the order but -0 not being a
distinct number from +0 makes that less clean as a solution.

Note that these patches do apply to the latest code from cvs. Has
anyone else tried them?

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