LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

edit

MIME-type aware file editor launcher

TLDR

Edit a file using the appropriate editor for its MIME type
$ edit [filename]
copy
Edit with explicit MIME type
$ edit [text/html]:[filename]
copy
Show the editor command without running it
$ edit --norun [filename]
copy
Using run-mailcap directly with the edit action
$ run-mailcap --action=edit [filename]
copy

SYNOPSIS

edit filename

DESCRIPTION

edit is an alias for run-mailcap's edit action. It opens files in the appropriate editor based on MIME type configuration in mailcap files.The actual editor used depends on the file type and system mailcap configuration.

PARAMETERS

filename

File to edit. Can be prefixed with a MIME type and optional encoding as `MIME-TYPE:[ENCODING:]FILE`.
--debug
Print extra diagnostic information about what is happening.
--nopager
Ignore any `copiousoutput` directive and send output directly to stdout.
--norun
Display the command that would be run without executing it.

CONFIGURATION

/etc/mailcap

System-wide MIME type to application mappings.
~/.mailcap
User-specific MIME type overrides.

CAVEATS

Debian/Ubuntu specific. The editor used depends on mailcap configuration and MIME type detection.

SEE ALSO

Copied to clipboard
Kai