Using variables in neomutt macros like 'current mail id'

29 Views Asked by At

In neomutt, I want a macro to execute a command, with the current message ID as argument.

As an example:


macro compose <F12> "<shell-escape>mkdir -p ~/tmp/neomutt/<current_id>/<enter>"

where <current_id> would be the desired variable, passing to the macro command the value of the Message ID of the composed email.

How can this be made?

Is it possible to use a variable for the full macro like:

macro compose <F12> "<shell-escape>mkdir -p ~/tmp/neomutt/<current_id>/<enter>\
<copy-file>~/tmp/<current_id>/message.txt<enter>\
<shell-escape>pandoc -o ~/tmp/<current_id>/message.html ~/tmp/<current_id>/message.txt<enter>\

with custom variables?

I've tried different variables like %i. I'd like also to be able to set variables on runtime like NOW=$(time)

0

There are 0 best solutions below