Forrest logo
tool overview
On this page you find all important commands for the CLI tool run-mailcap. If the command you are looking for is missing please ask our AI.

run-mailcap

run-mailcap is a command line tool used for displaying the contents of files based on their MIME type.

It is primarily used to invoke the appropriate application based on the file type, providing a seamless way to view or play files without having to manually specify the program each time.

When run-mailcap is executed, it reads the mailcap file, which is a configuration file that associates MIME types with commands or programs.

The tool determines the MIME type of a file by examining its extension or content, and then runs the associated command from the mailcap file to open the file in the desired application.

It supports various features such as sending standard input to the invoked program, handling multiple file arguments, and allowing user-defined entries in the mailcap file.

Additionally, run-mailcap can be used to test the configuration by displaying the command that would be executed without actually running it.

By default, if no entry is found for a particular MIME type in the mailcap file, run-mailcap falls back to using a system-wide mailcap file located in /etc/mailcap.

The tool can also be used to create or append entries to the personal mailcap file located at ~/.mailcap.

Run-mailcap is often utilized in email clients or other programs to handle file attachments and provide users with a convenient way to open or view the attachments in the appropriate applications.

Overall, run-mailcap greatly simplifies the process of launching the correct applications for different file types from the command line, enhancing the user experience and productivity.

List of commands for run-mailcap:

  • compose:tldr:d9191 compose: With `run-mailcap`.
    $ run-mailcap --action=compose ${filename}
    try on your machine
    explain this command
  • edit:tldr:00be6 edit: With `run-mailcap`.
    $ run-mailcap --action=edit ${filename}
    try on your machine
    explain this command
  • print:tldr:a608c print: With `run-mailcap`.
    $ run-mailcap --action=print ${filename}
    try on your machine
    explain this command
  • run-mailcap:tldr:2a18a run-mailcap: Turn on extra information.
    $ run-mailcap --action=ACTION --debug ${filename}
    try on your machine
    explain this command
  • run-mailcap:tldr:32a24 run-mailcap: Individual actions/programs on run-mailcap can be invoked with action flag.
    $ run-mailcap --action=ACTION [--option[=value]]
    try on your machine
    explain this command
  • run-mailcap:tldr:d4a0c run-mailcap: In simple language.
    $ run-mailcap --action=ACTION ${filename}
    try on your machine
    explain this command
  • run-mailcap:tldr:ee972 run-mailcap: Display the found command without actually executing it.
    $ run-mailcap --action=ACTION --norun ${filename}
    try on your machine
    explain this command
  • run-mailcap:tldr:f8a91 run-mailcap: Ignore any "copiousoutput" directive and forward output to standard output.
    $ run-mailcap --action=ACTION --nopager ${filename}
    try on your machine
    explain this command
  • see:tldr:5923d see: Using with `run-mailcap`.
    $ run-mailcap --action=view ${filename}
    try on your machine
    explain this command
tool overview