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

Re: TRAPINT doesn't work reliably



On Tue, 2019-09-17 at 16:47 +0000, Dennis Schwartz wrote:
> Hi,
> 
> I have a function on TRAPINT in my .zshrc like described as in the Zsh manual [1].
> 
>     TRAPINT() {
>         echo "trap: $1"
>         return $(( 128 + $1 ))
>     }
> 
> 
> This works unreliably. Usually this works a first few times, but after a while this doesn’t work anymore and throws the following error.
> 
> TRAPINT:1: command not found: \M-^A^A
> TRAPINT:2: command not found: F^\V

This certainly isn't likely to be anything you've done wrong, at least based on
what you've told us.

It smells of memory management problems, but it's hard to see where the corruption
would be.

What do you see if you run

functions TRAPINT

after the problem has turned up?

pws



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