What I want to do from inside a term shell is have a function called when there is new output or a certain regexp (e.g. a prompt) appears in in a term's output. The callback function should then be able to access text from the either the last time it was called, or from the last time that pattern was seen.
In comint
this would be a function stored in
comint-output-filter-functions
, and for eshell
: eshell-output-filter-functions
Can this be done in term.el? If so, how?
:before
advice toterm-emulate-terminal
-- theprocess-filter
of thebuffer-process
of aterm
buffer.