diff --git a/commands/msg/reply.go b/commands/msg/reply.go index a9ae5a1..51f6584 100644 --- a/commands/msg/reply.go +++ b/commands/msg/reply.go @@ -24,11 +24,11 @@ func init() { } func Reply(aerc *widgets.Aerc, args []string) error { - opts, optind, err := getopt.Getopts(args[1:], "aq") + opts, optind, err := getopt.Getopts(args, "aq") if err != nil { return err } - if optind != len(args)-1 { + if optind != len(args) { return errors.New("Usage: reply [-aq]") } var ( diff --git a/go.mod b/go.mod index a6c706b..b960fd6 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module git.sr.ht/~sircmpwn/aerc require ( - git.sr.ht/~sircmpwn/getopt v0.0.0-20190214165041-9a4f886f9fc7 + git.sr.ht/~sircmpwn/getopt v0.0.0-20190609193657-e7e23d1cd3a3 git.sr.ht/~sircmpwn/pty v0.0.0-20190330154901-3a43678975a9 github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index 5f6564c..b48ab47 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ git.sr.ht/~sircmpwn/getopt v0.0.0-20190214165041-9a4f886f9fc7 h1:xTFH5S/3ltiRvAtETLLDFWm5nVIouT5GeCPHm8UaVEU= git.sr.ht/~sircmpwn/getopt v0.0.0-20190214165041-9a4f886f9fc7/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= +git.sr.ht/~sircmpwn/getopt v0.0.0-20190609193657-e7e23d1cd3a3 h1:2l17fmuVbiS2cSx1m8e8GbikDUjAT5lril3/+XQsZAs= +git.sr.ht/~sircmpwn/getopt v0.0.0-20190609193657-e7e23d1cd3a3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= git.sr.ht/~sircmpwn/pty v0.0.0-20190330154901-3a43678975a9 h1:WWPN5lf6KzXp3xWRrPQZ4MLR3yrFEI4Ysz7HSQ1G/yo= git.sr.ht/~sircmpwn/pty v0.0.0-20190330154901-3a43678975a9/go.mod h1:8Jmcax8M9nYoEwBhVBhv2ixLRCoUqlbQPE95VpPu43I= git.sr.ht/~sircmpwn/tcell v0.0.0-20190602140719-d1981101c4c8 h1:FGePvymuUbWeTDZpd26O+XSLPP8/u6mjkIiUHbw88lQ=