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

Re: PATCH: highlight pasted text



Bart wrote:
> } Another disadvantage is that PS2 in general is irritating for the
> } fact that it restarts zle and push-line-or-edit tricks are needed on
> } up-cursor to allow editing the prebuffer.
> 
> I didn't say "restart zle at the PS2 prompt" ... I just said to display
> it.  It could be handled like RPS2 and immediately removed as soon as
> more keystrokes are received, at the time that the highlighting goes.

That's not quite so easy.
 
> Yeah, this is a good idea.  I think I'll add
> 
>     RPS2="<${PS2%> }"

Note, however, that where %_ is used in PS2, you might prefer %^ in
RPS2. That's the same thing but with the order reversed and I've just
realised that it isn't in the documentation; hence the small patch.

Oliver

diff --git a/Doc/Zsh/prompt.yo b/Doc/Zsh/prompt.yo
index 3075876..c4e2014 100644
--- a/Doc/Zsh/prompt.yo
+++ b/Doc/Zsh/prompt.yo
@@ -92,6 +92,10 @@ print as many as there are.  This is most useful in prompts tt(PS2) for
 continuation lines and tt(PS4) for debugging with the tt(XTRACE) option; in
 the latter case it will also work non-interactively.
 )
+item(tt(%^))(
+The status of the parser in reverse. This is the same as `tt(%_)' other than
+the order of strings.  It is often used in tt(RPS2).
+)
 xitem(tt(%d))
 item(tt(%/))(
 Current working directory.  If an integer follows the `tt(%)',



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