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

Re: preexec hook: possible enhancement?



On Sep 5, 12:34pm, Matthew Wozniski wrote:
}
} While we're on the topic of using the preexec hook to set the
} titlebar, I'd like to bounce something off the list and see if 1) it's
} possible and 2) people would consider it useful.  So, would it be
} possible and/or useful to have the preexec hook (or some other, new
} hook) fire once for each pipeline in the current command, rather
} than just once using the entire current line?

The TRAPDEBUG function is called at these points in the execution,
if you "setopt DEBUG_BEFORE_CMD".  However, I don't remember offhand
whether it's possible to access the command text that is about to be
executed.  The documentation for TRAPDEBUG is pretty sparse.

(Also DEBUG_BEFORE_CMD requires a very recent zsh version.)



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