diff options
author | Robin Jarry <robin@jarry.cc> | 2023-12-03 14:23:03 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-12-04 11:33:35 +0100 |
commit | bbc60604b3183af070cf74a52a5cf9da825eabdf (patch) | |
tree | db4971c1f390c71592c37a7c100108a247eecf9c /commands/eml.go | |
parent | feafc433f08761290831e44fccf023badb5588aa (diff) | |
download | aerc-bbc60604b3183af070cf74a52a5cf9da825eabdf.tar.gz |
eml: expand tilde to home dir
Allow running :eml ~/foo/baz.eml.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'commands/eml.go')
-rw-r--r-- | commands/eml.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 } |