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

Re: ZLE special parameters



Zefram wrote:
> Incidentally, if I read the unset code correctly, a parameter created
> within a function using typeset can actually be removed by a nested
> function using unset, although it can't be removed by the function itself.
> Is this POSIX behaviour, desirable, neither or both?

This is probably wrong.  There was an exchange between Bart and me
about funny things with typeset and local variables some time ago.  It
needs rewriting.

I'm getting a core dump with the increment function: it's quite
possible I've missed some necessary intermediate patch, though; the
number pending is rather large at the moment.

% zle -N increment
% bindkey \^xi increment
% echo 38

Hitting ^xi twice gives a core dump.  Any modification of LBUFFER
seems to do this.  It's coming in makezleparams(); createparam() is
returning a NULL because the (oldpm && !(oldpm->flags & PM_UNSET))
test failed.  Oddly enough, it's always when zp->name is BUFFER even
if I only change LBUFFER.  Even if I am missing a patch, I worry about
relying on the parameter not already existing at this point.

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.



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