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

"trap ... DEBUG" to execute before (instead of after) each command



Currently "trap ... DEBUG" is used to define some routine that is
executed AFTER each command. This is modeled after the old ksh.

The new Korn shell 93 has changed this behavior. The "trap DEBUG"
routine is executed BEFORE each command instead. This new behavior
makes more sense and is useful in writing a symbolic debugger for
shell scripts.

I would appreciate any information on how one can make zsh (perhaps
even hacking the zsh source code) emulate this new behavior of the
Korn shell. 

I suggest that future version of zsh should provide this feature (by
using a new option that can be set or unset to get the old or new
behavior).

Please reply to me directly if that is easier. Thanks for any help.

mk kwong
mkkwong@xxxxxxxxxxxxxxxxxx



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