diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-06-09 18:29:21 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-06-09 18:29:21 -0400 |
commit | c55223106dc68a330bef4fde55260fb4502eeb4e (patch) | |
tree | a490d7403b54e7e0c73af4c949033bfe8f5d2102 /commands/msg | |
parent | 702ad43bd2e5474669eae07eade44669f4f24b02 (diff) |
Fix :move command's arg parsing
Diffstat (limited to 'commands/msg')
-rw-r--r-- | commands/msg/move.go | 6 |
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) { |