I want to view some mails in external commands, like less or vim, but when I do something like the following

macro index <f6> "|less -\n" "view with less"

then the whole mail source will be displayed in the external command which is (at least for me) too much. Can I only pipe the content (neo)mutt would display to external commands?


By setting the pipe_decode option, Mutt will decode the message if necessary, and also weed headers so that only the headers that you would ordinarily see in the pager would be piped to whatever command you use.

From the Mutt manual on my system:

3.208. pipe_decode

   Type: boolean
   Default: no

   Used in connection with the <pipe-message> command. When unset, Mutt
   will pipe the messages without any preprocessing. When set, Mutt will
   weed headers and will attempt to decode the messages first.

(also available here: http://www.mutt.org/doc/manual/#pipe-decode)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.