eshell-exec-hook

eshell-exec-hook is a variable defined in `esh-proc.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
Called each time a process is exec'd by `eshell-gather-process-output'.
It is passed one argument, which is the process that was just started.
It is useful for things that must be done each time a process is
executed in a eshell mode buffer (e.g., `process-kill-without-query').
In contrast, `eshell-mode-hook' is only executed once when the buffer
is created.

You can customize this variable.