Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
"functions -c" and TRAPxxx
- X-seq: zsh-workers 50340
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: "functions -c" and TRAPxxx
- Date: Mon, 6 Jun 2022 18:59:11 -0700
- Archived-at: <https://zsh.org/workers/50340>
- List-id: <zsh-workers.zsh.org>
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