Michael Stone <[email protected]> writes:
>
> I'm not sure why this would be useful.

Currently "run-mailcap --action=cat" cannot cat a text/plain text file
but adding a mailcap entry will let it work.

> Why wouldn't you just pipe the
> file to a pager and avoid the mailcap indirection?

Primarily for genericness.  If you have a mail part or file then you let
run-mailcap find a good command.

But --action=cat is not for a pager, rather getting plain text to pass
on somewhere else.  For text/plain this is a no-op, but that knowledge
is not built-in to run-mailcap, hence a "cat" entry.  (Not hard-coding
it seems reasonable to me.  Let the runner be general and add entries
expressing what various programs like "cat" can or will do.  Other
programs might make use of those entries too.)

> I'd think this
> would be more likely to confuse people with control character output
> when they're expecting an image or somesuch.

Oh, images or other binaries are meant to be crunched by the mailcap
rules to plain text for this --action=cat, or at least that's the idea.
For example xlhtml can crunch an application/excel to text (via html in
its case).  Or "tar" and 'unzip" offer a contents listing for tar and
zip files.


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to