about summary refs log tree commit diff stats
path: root/commands/msg/move.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg/move.go')
-rw-r--r--commands/msg/move.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/msg/move.go b/commands/msg/move.go
index 7742ffb..5300c5a 100644
--- a/commands/msg/move.go
+++ b/commands/msg/move.go
@@ -17,11 +17,11 @@ func init() {
 }
 
 func Move(aerc *widgets.Aerc, args []string) error {
-	opts, optind, err := getopt.Getopts(args[1:], "p")
+	opts, optind, err := getopt.Getopts(args, "p")
 	if err != nil {
 		return err
 	}
-	if optind != len(args)-2 {
+	if optind != len(args)-1 {
 		return errors.New("Usage: mv [-p] <folder>")
 	}
 	var (
@@ -46,7 +46,7 @@ func Move(aerc *widgets.Aerc, args []string) error {
 		aerc.RemoveTab(widget)
 	}
 	acct.Messages().Next()
-	store.Move([]uint32{msg.Uid}, args[optind+1], createParents, func(
+	store.Move([]uint32{msg.Uid}, args[optind], createParents, func(
 		msg types.WorkerMessage) {
 
 		switch msg := msg.(type) {
kartik/mu/commit/cpp/028space_surround?h=main&id=8f1db754005616054192b3f75e54af9929df26cc'>8f1db754 ^
2f5f7919 ^
8f1db754 ^






















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44