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

Re: preexec hook: possible enhancement?

On Wed, Sep 05, 2007 at 12:34:17PM -0400, 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?
> For instance, if one were to type
> % xterm ; echo google.com | xargs w3m ; gnome-terminal
> could a hook be inserted to fire once with "xterm", once with "echo 
> google.com | xargs w3m", and once with "gnome-terminal" passed to it,
> rather than just once with
> "xterm ; echo google.com | xargs w3m ; gnome-terminal" passed to it?
> It's by no means a necessary feature, and I don't know if others would
> even find it useful, but I think it would be pretty cool to watch the
> titlebar change as we moved from one pipeline to the next.

Hi Matthew,

You can probably do that already with the DEBUG trap or


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