[neomutt-users] executing shell scripts with startup-hooks

Steve Quezadas steveeq1 at gmail.com
Sun Nov 10 16:55:25 CET 2019

Ok, see what happened. The verison of neomutt that came with my ubuntu
version was from 2017 and startup-hook and shutdown-hook did not support
the "echo" function

On Sun, Nov 10, 2019 at 4:35 AM Richard Russon <rich at flatcap.org> wrote:

> Hi Steve,
> > 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>).
> Cheers,
>     Rich / FlatCap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.neomutt.org/pipermail/neomutt-users-neomutt.org/attachments/20191110/7d3b2f83/attachment.html>

More information about the neomutt-users mailing list