I use this line for images in my
image/*; eog %s &;
but mutt immediately deletes the temp file and eog can’t load it.
When I remove the
& mutt waits for eog to be closed until it escapes from the command line.
Here's what I use:
Every time an attempt to open an attachment is made, it's copied in a dedicated temp directory and the copy is opened.
You may or may not need the
Needless to say, you can use this with any command.
You could use a wrapper command that:
And put something like:
The above makes no assumption on where the filename(s) appear(s) in the list of arguments or what character they contains... Which is why we first ask
In most cases, it would be overkill though, and as Gilles points out may not work if tmpdir is specified as relative to your mailbox folder.
A simpler one would be: