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

Re: 4.3.11 TRAPEXIT() on cygwin



On Jan 11,  9:38am, Peter Stephenson wrote:
}
} This tries to summarize the differences I know about.

The other thing worth mentioning is that you can't have both of them
at once.  If you set a list trap, it supplants the function trap in
the same scope, and vice-versa.

Also you can't restore the previously scoped trap by removing the new
one -- "unfunction TRAPEXIT" deletes the trap entirely.

This, however, might be a bug:

----
% trap 'print list' EXIT; unfunction TRAPEXIT; print exiting; exit
unfunction: no such hash table element: TRAPEXIT
exiting
----

Removing the TRAPEXIT function deletes the EXIT list trap even if there
is no TRAPEXIT function.



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