about summary refs log tree commit diff stats
path: root/commands/msg/reply.go
diff options
context:
space:
mode:
authorClayton Craft <clayton@craftyguy.net>2019-06-08 11:57:56 -0700
committerDrew DeVault <sir@cmpwn.com>2019-06-09 15:50:50 -0400
commitf5a4d935ef26ee7e7c0e4cabd840a759c6b132bf (patch)
tree78e3924714f523fbffafa8f94ff173cd4fb7da71 /commands/msg/reply.go
parent50f25e7c4deecebcd42a07263a3cd50432c6db15 (diff)
downloadaerc-f5a4d935ef26ee7e7c0e4cabd840a759c6b132bf.tar.gz
Update reply to use getopt posix optind format
This changes the handling of optind for the 'reply' command to match
recent changes to getopt.
Diffstat (limited to 'commands/msg/reply.go')
-rw-r--r--commands/msg/reply.go4
1 files changed, 2 insertions, 2 deletions
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 (