diff options
Diffstat (limited to 'commands/compose/attach.go')
-rw-r--r-- | commands/compose/attach.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/commands/compose/attach.go b/commands/compose/attach.go index 969d12ed..2b633dc6 100644 --- a/commands/compose/attach.go +++ b/commands/compose/attach.go @@ -3,6 +3,7 @@ package compose import ( "fmt" "os" + "strings" "time" "git.sr.ht/~sircmpwn/aerc/commands" @@ -22,20 +23,16 @@ func (Attach) Aliases() []string { } func (Attach) Complete(aerc *widgets.Aerc, args []string) []string { - path := "" - if len(args) >= 1 { - path = args[0] - } - + path := strings.Join(args, " ") return commands.CompletePath(path) } func (Attach) Execute(aerc *widgets.Aerc, args []string) error { - if len(args) != 2 { + if len(args) == 1 { return fmt.Errorf("Usage: :attach <path>") } - path := args[1] + path := strings.Join(args[1:], " ") path, err := homedir.Expand(path) if err != nil { |