On Mon, Sep 05, 2016 at 08:46:44AM -0400, Peter P. wrote:
> I am frequently attaching images to emails in mutt and wonder if there
> is a way I can preview them when selecting the files, but before
> actually attaching them. I imagine selecting/entering the path to the
> file to be attached, but then pressing TAB once more, or using any
> other keypress, launching eg. imagemagick's display to show the image
> briefly.

I have in my .mailcap:

  image/*; mutt_bgrun sxiv -fbz100 '%s'

Then, in mutt's Compose view, <Return> is bound to view-attach --
selecting an attachment and hitting return opens the file in the
specified application _after_ attaching the file.

In the Directory view when navigation to an attachment, <Space> is bound
to view-file and does the same _before_ attaching the file.

This works for every mimetype you have a suitable viewer for.

Reply via email to