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

Re: PS1 or PS2



Andrej Borsenkow wrote:

> I already wrote about this: when on PS2 up-line-or-history moves to previous
> history event instead of previous line of current event. It just occured to me,
> that something like
> 
> if we-are-on-PS2
>   zle .push-line-or-edit
> zle .up-line-or-history
> 
> would do quite nicely ... but how can I find out (in user defined widget) that I
> am on PS2? The info is available (push-line-or-edit has it) - is it possible to
> make it available to user widgets as well?

I haven't tried, but [[ -z "$PREBUFFER" ]] should work.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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