From e1d8bc4d17cb7bd79e19fdf866d1da2fedda4de5 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Tue, 14 Jun 2022 21:10:48 +0200 Subject: msgviewer: open http links from messages Parse http links from a message and display them as completions in the :open-link command. Add the following binds to the [view] section in your binds.conf: = :open-link Parsing can be disabled in aerc.conf by setting parse-http-links to false in the viewer section. Thanks to Moritz for the help with the regular expression. Signed-off-by: Koni Marti Reviewed-by: Moritz Poldrack Acked-by: Robin Jarry --- config/config.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config/config.go') diff --git a/config/config.go b/config/config.go index 923a1a0..dae32b7 100644 --- a/config/config.go +++ b/config/config.go @@ -160,6 +160,7 @@ type ViewerConfig struct { Alternatives []string ShowHeaders bool `ini:"show-headers"` AlwaysShowMime bool `ini:"always-show-mime"` + ParseHttpLinks bool `ini:"parse-http-links"` HeaderLayout [][]string `ini:"-"` KeyPassthrough bool `ini:"-"` } @@ -705,6 +706,7 @@ func LoadConfigFromFile(root *string, logger *log.Logger) (*AercConfig, error) { {"Date"}, {"Subject"}, }, + ParseHttpLinks: true, }, Statusline: StatuslineConfig{ -- cgit v1.2.3