diff options
author | Robin Jarry <robin@jarry.cc> | 2023-03-12 10:55:47 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-03-13 23:35:48 +0100 |
commit | 49f58adda429c54225d79d13bfad7a054ae29db2 (patch) | |
tree | 316fb8eaa0b4c6dd32f610847db58473730ea8d4 /doc | |
parent | 6ea08564041640a4d3552a9934e4317b1086fa9b (diff) | |
download | aerc-49f58adda429c54225d79d13bfad7a054ae29db2.tar.gz |
openers: add mime type handling for open-link
Provide a way to configure link openers. Based on the URL mime type:
x-scheme-handler/$scheme.
Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/aerc-config.5.scd | 15 | ||||
-rw-r--r-- | doc/aerc.1.scd | 5 |
2 files changed, 14 insertions, 6 deletions
diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd index 4d64a6f4..290a1381 100644 --- a/doc/aerc-config.5.scd +++ b/doc/aerc-config.5.scd @@ -803,18 +803,21 @@ customizations of the built-in filters. # OPENERS -Openers allow you to specify the command to use for the *:open* action on a -per-MIME-type basis. They are configured in the *[openers]* section of -_aerc.conf_. +Openers allow you to specify the command to use for the *:open* and *:open-link* +actions on a per-MIME-type basis. The *:open-link* URL scheme is used to +determine the MIME type as follows: _x-scheme-handler/<scheme>_. They are +configured in the *[openers]* section of _aerc.conf_. -_{}_ is expanded as the temporary filename to be opened. If it is not -encountered in the command, the temporary filename will be appened to the end -of the command. Environment variables are also expanded. Tilde is not expanded. +_{}_ is expanded as the temporary filename or URL to be opened. If it is not +encountered in the command, the filename/URL will be appened to the end of the +command. Environment variables are also expanded. Tilde is not expanded. Example: ``` [openers] +x-scheme-handler/irc=hexchat +x-scheme-handler/https=firefox text/html=surf -dfgms text/plain=gvim {} +125 message/rfc822=thunderbird diff --git a/doc/aerc.1.scd b/doc/aerc.1.scd index fec264b7..964c1d9c 100644 --- a/doc/aerc.1.scd +++ b/doc/aerc.1.scd @@ -474,6 +474,11 @@ message list, the message in the message viewer, etc). not encountered in the arguments, the temporary filename will be appened to the end of the command. +*:open-link* _<url>_ [_<args...>_] + Open the specified URL with an external program. The opening logic is + the same than for *:open* but the opener program will be looked up + according to the URL scheme MIME type: _x-scheme-handler/<scheme>_. + *:save* [*-fpa*] _<path>_ Saves the current message part to the given path. If the path is not an absolute path, *[general].default-save-path* from |