aerc/config
Robin Jarry 45bff88515 open: allow overriding default program
Instead of xdg-open (or open on MacOS), allow forcing a program to open
a message part. The program is determined in that order of priority:

1) If :open has arguments, they will be used as command to open the
   attachment. If the arguments contain the {} placeholder, the
   temporary file will be substituted, otherwise the file path is added
   at the end of the arguments.

2) If a command is specified in the [openers] section of aerc.conf for
   the part MIME type, then it is used with the same rules of {}
   substitution.

3) Finally, fallback to xdg-open/open with the file path as argument.

Update the docs and default config accordingly with examples.

Fixes: https://todo.sr.ht/~rjarry/aerc/64
Co-authored-by: Jason Stewart <support@eggplantsd.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
2022-10-01 15:47:25 +02:00
..
accounts.conf Copy sent emails to the Sent folder 2019-05-15 19:41:21 -04:00
aerc.conf open: allow overriding default program 2022-10-01 15:47:25 +02:00
bindings.go bindings: add alt modifier 2022-09-13 22:50:16 +02:00
bindings_test.go bindings: support more modified keys 2021-10-28 16:22:28 +02:00
binds.conf switch: add -n and -p flags for relative switch 2022-09-20 20:55:29 +02:00
config.go open: allow overriding default program 2022-10-01 15:47:25 +02:00
default_styleset fix aerc-stylesets(7) typos 2020-12-13 10:30:56 +01:00
style.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
triggers.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00