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:
parent
50f25e7c4d
commit
f5a4d935ef
3 changed files with 5 additions and 3 deletions
commands/msg
|
@ -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 (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue