run-mailcap:tldr:32a24
The run-mailcap
command is used to launch an appropriate application according to the user-defined mailcap file. The mailcap file specifies what command should be executed for a particular file type or MIME type.
The command syntax is as follows:
run-mailcap --action=ACTION [--option[=value]]
-
--action
is a required parameter that specifies the action to perform. This can be one of the following:view
: View the file.edit
: Edit the file.print
: Print the file.compose
: Compose a new email with the file as an attachment.
-
--option[=value]
are optional parameters that provide additional options for the specified action. Some commonly used options include:--force-external
: Forces the command to use an external viewer even if an internal viewer is available.--nopreview
: Skips any preview for the file and directly performs the specified action.
These options can vary depending on the mailcap file and the available applications on the system.
By using the run-mailcap
command with the appropriate action, you can automate the process of opening files or performing operations based on their associated MIME types or file types.