aboutsummaryrefslogtreecommitdiff
path: root/commands/account/mkdir.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/account/mkdir.go')
-rw-r--r--commands/account/mkdir.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/commands/account/mkdir.go b/commands/account/mkdir.go
index d42928e..bb7e38a 100644
--- a/commands/account/mkdir.go
+++ b/commands/account/mkdir.go
@@ -2,6 +2,7 @@ package account
import (
"errors"
+ "strings"
"time"
"github.com/gdamore/tcell"
@@ -25,14 +26,14 @@ func (MakeDir) Complete(aerc *widgets.Aerc, args []string) []string {
}
func (MakeDir) Execute(aerc *widgets.Aerc, args []string) error {
- if len(args) != 2 {
+ if len(args) == 0 {
return errors.New("Usage: :mkdir <name>")
}
acct := aerc.SelectedAccount()
if acct == nil {
return errors.New("No account selected")
}
- name := args[1]
+ name := strings.Join(args[1:], " ")
acct.Worker().PostAction(&types.CreateDirectory{
Directory: name,
}, func(msg types.WorkerMessage) {