From f5a4d935ef26ee7e7c0e4cabd840a759c6b132bf Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Sat, 8 Jun 2019 11:57:56 -0700 Subject: Update reply to use getopt posix optind format This changes the handling of optind for the 'reply' command to match recent changes to getopt. --- commands/msg/reply.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commands/msg') 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 ( -- cgit 1.4.1-2-gfad0