aerc

Working clone of aerc-mail.org
git clone git://git.danielmoch.com/aerc.git
Log | Files | Refs | README | LICENSE

quit.go (343B)


      1 package commands
      2 
      3 import (
      4 	"errors"
      5 
      6 	"git.sr.ht/~sircmpwn/aerc/widgets"
      7 )
      8 
      9 func init() {
     10 	register("quit", CommandQuit)
     11 }
     12 
     13 type ErrorExit int
     14 
     15 func (err ErrorExit) Error() string {
     16 	return "exit"
     17 }
     18 
     19 func CommandQuit(aerc *widgets.Aerc, args []string) error {
     20 	if len(args) != 1 {
     21 		return errors.New("Usage: quit")
     22 	}
     23 	return ErrorExit(1)
     24 }