aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorDaniel Bridges <bridges2@gmail.com>2019-08-03 21:09:13 -0700
committerDrew DeVault <sir@cmpwn.com>2019-08-07 14:07:48 +0900
commit0a521241025d22d060b62cabe145bd9768b5da16 (patch)
tree09661a7bce1b209effa7d80edc7153b33af796c4 /commands
parent0ceea02720bcebb7e672b42cc72b2e8ce117ada8 (diff)
downloadaerc-0a521241025d22d060b62cabe145bd9768b5da16.tar.gz
Allow cc/bcc command to receive no arguments
Diffstat (limited to 'commands')
-rw-r--r--commands/compose/cc-bcc.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/compose/cc-bcc.go b/commands/compose/cc-bcc.go
index 864bb8e1..db5f5b64 100644
--- a/commands/compose/cc-bcc.go
+++ b/commands/compose/cc-bcc.go
@@ -1,7 +1,6 @@
package compose
import (
- "fmt"
"strings"
"git.sr.ht/~sircmpwn/aerc/widgets"
@@ -22,10 +21,10 @@ func (_ CC) Complete(aerc *widgets.Aerc, args []string) []string {
}
func (_ CC) Execute(aerc *widgets.Aerc, args []string) error {
- if len(args) < 2 {
- return fmt.Errorf("Usage: %s <addresses>", args[0])
+ var addrs string
+ if len(args) > 1 {
+ addrs = strings.Join(args[1:], " ")
}
- addrs := strings.Join(args[1:], " ")
composer, _ := aerc.SelectedTab().(*widgets.Composer)
switch args[0] {