From bbc60604b3183af070cf74a52a5cf9da825eabdf Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Sun, 3 Dec 2023 14:23:03 +0100 Subject: eml: expand tilde to home dir Allow running :eml ~/foo/baz.eml. Signed-off-by: Robin Jarry Acked-by: Moritz Poldrack --- commands/eml.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'commands/eml.go') diff --git a/commands/eml.go b/commands/eml.go index fe735243..06a78ffd 100644 --- a/commands/eml.go +++ b/commands/eml.go @@ -8,6 +8,7 @@ import ( "git.sr.ht/~rjarry/aerc/app" "git.sr.ht/~rjarry/aerc/lib" + "git.sr.ht/~rjarry/aerc/lib/xdg" ) type Eml struct { @@ -69,7 +70,7 @@ func (e Eml) Execute(args []string) error { return fmt.Errorf("unsupported operation") } } else { - f, err := os.Open(e.Path) + f, err := os.Open(xdg.ExpandHome(e.Path)) if err != nil { return err } -- cgit