LinuxCommandLibrary

run-mailcap

Open files using mailcap MIME type entries

TLDR

View a file using mailcap entry

$ run-mailcap --action=view path/to/file
copy
Edit a file using mailcap entry
$ run-mailcap --action=edit path/to/file
copy
Run with debug information
$ run-mailcap --action=view --debug path/to/file
copy
Forward output to stdout without pager
$ run-mailcap --action=view --nopager path/to/file
copy
Display command without executing
$ run-mailcap --action=view --norun path/to/file
copy

SYNOPSIS

run-mailcap [options] file

DESCRIPTION

run-mailcap executes programs via entries in the mailcap file based on MIME types. It selects appropriate handlers for viewing, editing, printing, or composing files.
The mailcap database maps MIME types to applications, enabling automatic file handling based on content type.

PARAMETERS

--action action

Action to perform (view, cat, compose, composetyped, edit, print)
--debug
Show extra information
--nopager
Forward output to stdout, ignore copiousoutput
--norun
Display command without executing

CAVEATS

Behavior depends on mailcap configuration. Some MIME types may not have configured handlers.

HISTORY

Part of mime-support package, providing MIME type handling utilities based on RFC 1524 mailcap specification.

SEE ALSO

see(1), edit(1), print(1), file(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community