reddit / emacs

Eshell preexec?

CorysInTheHouse69 · 2022-07-18 01:15
Zsh has a function called “preexec” that is ran before your command is executed. Does eshell have an equivalent? I.e. everytime I run a command in eshell this command is run before that command is executed
Faerryn · 2022-07-18 03:55
You can add your function to `eshell-pre-command-hook`. e.g. ``` (defun preexec-hello () (message "Yo")) (add-hook 'eshell-pre-command-hook #'preexec-hello) ```
CorysInTheHouse69 · 2022-07-18 15:15
Thanks