Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh exits after delete-char-or-list and two ^Cs
- X-seq: zsh-workers 20328
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: zsh exits after delete-char-or-list and two ^Cs
- Date: Tue, 07 Sep 2004 15:08:57 +0100
- In-reply-to: <Pine.LNX.4.61.0409030827210.28049@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200409020919.i829J0eC012233@xxxxxxxxxxxxxx> <Pine.LNX.4.61.0409020755430.18377@xxxxxxxxxxxxxxxxxx> <200409030937.i839bJxR018972@xxxxxxxxxxxxxx> <Pine.LNX.4.61.0409030827210.28049@xxxxxxxxxxxxxxxxxx>
> On Fri, 3 Sep 2004, Peter Stephenson wrote:
> > Bart Schaefer wrote:
> > > zle && echo "widgets callable" # I'm least certain of this
> > > zle -I && echo "Display invalidated and widgets callable"
> > > zle -R && echo "Display refreshed and zle active"
> > >
> > > Is that right?
> >
> > Yes, noting that testing for `display invalidated' and `display
> > refreshed' doesn't form part of the return status (I think that's what
> > you mean but it's not clear from the output).
>
> Hmm. OK, that's not so good, because it breaks "zle -I || ..." in the
> case where you want to know whether the display was NOT invalidated.
> (Maybe there's never a reason to care about that, but ...)
I don't think there is, in fact, but for the sake of logic it's probably
worth changing. I've looked at the pattern of usage of zle -I in the
various functions I've got and I never test the return value at all:
either zle wasn't active, or it's been invalidated, and either are good
enough for me. (I do, however, test [[ -o zle ]] beforehand to avoid
having to load it if it wasn't in use.)
It would require putting the test back to testing for zleactive. That
means your original example wouldn't work, but as you say that's really
a problem with the documentation for when I feel fit enough to look at
the zle documentation again.
The display is refreshed if and only if zle is active on zle -R, so that
doesn't need changing.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author