Update reply to use getopt posix optind format

This changes the handling of optind for the 'reply' command to match
recent changes to getopt.
This commit is contained in:
Clayton Craft 2019-06-08 11:57:56 -07:00 committed by Drew DeVault
parent 50f25e7c4d
commit f5a4d935ef
3 changed files with 5 additions and 3 deletions
commands/msg

View file

@ -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 (