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

"functions -c" and TRAPxxx



I'm not feeling quite knowledgeable enough about settrap /
removetrapnode vis-a-vis reference counting to offer a patch for this
yet, so if someone else wants to jump in or educate me, please do.

Creating a TRAPxxx function by "aliasing" to another function with
"functions -c" does not create the expected trap handler.

% TRAPUSR1() { print $0 }
% functions -c TRAPUSR1 TRAPUSR2
% trap
TRAPUSR1 () {
    print $0
}
% functions -m TRAP\*
TRAPUSR1 () {
    print $0
}
TRAPUSR2 () {
    print $0
}
%

Aside:  Local trap handling in _main_complete confuses trap-name completion:

% compinit
% zstyle '*' format %d
% trap
% functions -c TRAP<TAB>
old name
TRAPINT   TRAPQUIT

I don't know that we can do anything about this, I just found it
briefly confusing.




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