For my function, that I have created, I'm looking for an Eshell mode hook.
I'm aware of the following hook:
(add-hook 'eshell-mode-hook 'my-function-for-eshell).
But what when I'm in a other buffer and want to switch back to the existing buffer with Eshell mode, I want to run that function? But I found all the hooks only will be triggered, when you create a new buffer with an Eshell mode.
To be clear, I run Evil normal mode when I do switch buffers with a keybinding in normal mode.
my-function-for-eshell brings me back in Evil insert mode, when I go back to Eshell.