summary refs log tree commit diff stats
path: root/commands/account/mkdir.go
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2019-09-20 17:16:29 +0100
committerDrew DeVault <sir@cmpwn.com>2019-09-20 15:06:34 -0400
commit39307a6fa7e96641b822ed0a9acb75021dcf7fe9 (patch)
tree683aec09eb86e2077148a53429681aa39776449b /commands/account/mkdir.go
parent3ec9fd216d9e3b38d1d5abb5fba24199185f7054 (diff)
downloadaerc-39307a6fa7e96641b822ed0a9acb75021dcf7fe9.tar.gz
Make commands join args with spaces
This patch ensures the following commands join their arguments with
spaces to make it easier to interact with:

- cf
- mkdir
- cd
- attach
- detach
- ct
- copy
- move
- save
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) {
tring.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
[colours]
bkgnd=default
titlebar=yellow
statusbar=yellow
titlebar.text=black
titlebar.brackets=black
statusbar.text=magenta
statusbar.brackets=black
statusbar.active=magenta
statusbar.new=magenta
main.text=white
input.text=yellow
main.time=white
main.splash=yellow
online=green
away=yellow
chat=green
dnd=green
xa=yellow
offline=bold_black
typing=cyan
gone=red
error=red
incoming=yellow
roominfo=green
me=black_bold
them=yellow
titlebar.unencrypted=red
titlebar.encrypted=green
titlebar.untrusted=red
titlebar.trusted=green
otr.started.trusted=green
otr.started.untrusted=red
otr.ended=yellow
otr.trusted=green
otr.untrusted=red
titlebar.online=magenta
titlebar.offline=black
titlebar.away=magenta
titlebar.chat=magenta
titlebar.dnd=magenta
titlebar.xa=magenta
main.text.me=white
main.text.them=white
subscribed=magenta
unsubscribed=black_bold
roommention=cyan
roster.header=yellow
occupants.header=yellow
receipt.sent=red