2015-02-05 13:18:43 +0000, Debarshi Ray:
> Hey,
> 
> I work on gnome-terminal. I am trying to add support for notifying the
> user when a long-running command finishes in an inactive tab or
> window.  I am currently emitting a custom escape sequence [1] from
> PROMPT_COMMAND, with the command parsed from $(history 1) as an
> argument.
[...]

Can you not just do a tcgetpgrp() periodically (or upon tty
setting change since modern shells change the tty settings
when entering and leaving their prompt) on the pseudo-tty
(doing it on the master side seems to work as well at least on
Linux) and use the names of the processes in that group (from
/proc for instance)?

That would have the advantage of being shell-agnostic.

-- 
Stephane


Reply via email to