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

Re: TRAPDEBUG exit bug?



On Jul 28,  8:48pm, Joshua Krusell wrote:
}
} Setting TRAPDEBUG seems to make zsh unexpectedly emit SIGEXIT after a
} command following a failed && or || conditional expr.

Hm, it's even weirder than that:

torch% trap "" DEBUG
torch% trap "print exit trap" EXIT
torch% trap
trap -- 'print exit trap' EXIT
trap -- '' DEBUG
torch% false && :
torch% :
exit trap
torch% trap
trap -- '' DEBUG
torch% 

Note that the exit trap itself has now disappeared.  This happens with
a TRAPEXIT function as well.

-- 
Barton E. Schaefer



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