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

Feature Request: Allow skipping zsh statement on return from trap DEBUG



A while ago I wrote a debugger for zsh called zshdb
<https://zshdb.readthedocs.io/en/latest/>. See also
https://repology.org/project/zshdb/versions .

A feature that is missing in the debugger and that is available in the
corresponding debugger for bash, bashdb,  is the skip command.

This command skips over the upcoming statement to be executed. The way this
works in bashdb, is that if the debug hook returns with a nonzero value.
The way BASH works is that if the trap DEBUG hook returns a nonzero value,
BASH skips statement to be run.

Thoughts about extening zsh so that it too will skip the upcoming statement
if the zsh trap DEBUG hook return a non-zero value.  Or more generally some
means by which a DEBUG hook can indicate to zsh to skip the upcoming
statement?

Thanks.


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