[neomutt-users] executing shell scripts with startup-hooks
rich at flatcap.org
Sun Nov 10 11:58:47 CET 2019
> has anyone got executing shellscripts with startup-hook or shutdown-hook
A simple way to do it is to use backticks (``).
(tested with 2018-07-16 and 2019-11-02)
startup-hook 'echo "`date | tee -a startup.log`"'
shutdown-hook 'echo "`date | tee -a shutdown.log`"'
The hooks are expecting a *NeoMutt* command, so we'll use 'echo'.
Anything put in backticks (``) will be executed and its output will be
passed to the 'echo' command. We quote ("") the backticks just in case
there's whitespace in the output.
The command writes the date to a file, but also displays it to the user.
The message isn't visible because of lots of redrawing during startup,
but you can see it in the logs ('M' <show-log-messages>).
Rich / FlatCap
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the neomutt-users