~rjarry/public-inbox

aerc: eml: expand tilde to home dir v1 PROPOSED

Robin Jarry: 1
 eml: expand tilde to home dir

 1 files changed, 2 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~rjarry/public-inbox/patches/47318/mbox | git am -3
Learn more about email & git

[PATCH aerc] eml: expand tilde to home dir Export this patch

Allow running :eml ~/foo/baz.eml.

Signed-off-by: Robin Jarry <robin@jarry.cc>
---
 commands/eml.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/commands/eml.go b/commands/eml.go
index fe7352430c8d..06a78ffd535e 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
		}
-- 
2.43.0