about summary refs log tree commit diff stats
path: root/commands/quit.go
blob: 63bc94a9ade000d5e0063dfefdb2aa30b228ca1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package commands

import (
	"errors"

	"git.sr.ht/~sircmpwn/aerc/widgets"
)

type Quit struct{}

func init() {
	register(Quit{})
}

func (Quit) Aliases() []string {
	return []string{"quit", "exit"}
}

func (Quit) Complete(aerc *widgets.Aerc, args []string) []string {
	return nil
}

type ErrorExit int

func (err ErrorExit) Error() string {
	return "exit"
}

func (Quit) Execute(aerc *widgets.Aerc, args []string) error {
	if len(args) != 1 {
		return errors.New("Usage: quit")
	}
	return ErrorExit(1)
}
1:37:59 +0000 Added roster room themes' href='/danisanti/profani-tty/commit/themes/mono?id=cd2458c0198bab99655248dd2e1071a862e5ef80'>cd2458c0 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78


              

                       










                          
                    
                    





                        
                 








                           





             
              

             


            

                 
                      
                 
                      

          
                   

















                           

                        

                         
                      
                  
[colours]
bkgnd=default
titlebar=white
titlebar.text=black
titlebar.brackets=black
titlebar.unencrypted=black
titlebar.encrypted=black
titlebar.untrusted=black
titlebar.trusted=black
titlebar.online=black
titlebar.offline=black
titlebar.away=black
titlebar.chat=black
titlebar.dnd=black
titlebar.xa=black
statusbar=white
statusbar.text=black
statusbar.time=black
statusbar.brackets=black
statusbar.active=black
statusbar.new=black
main.text=white
main.text.me=white
main.text.them=white
main.splash=white
main.time=white
input.text=white
subscribed=white
unsubscribed=white
otr.started.trusted=white
otr.started.untrusted=white
otr.ended=white
otr.trusted=white
otr.untrusted=white
online=white
away=white
chat=white
dnd=white
xa=white
offline=white
incoming=white
mention=white
trigger=white
typing=white
gone=white
error=white
roominfo=white
roommention=white
roommention.term=white
roomtrigger=white
roomtrigger.term=white
me=white
them=white
roster.header=white
roster.chat=white
roster.online=white
roster.away=white
roster.xa=white
roster.dnd=white
roster.offline=white
roster.chat.active=white
roster.online.active=white
roster.away.active=white
roster.xa.active=white
roster.dnd.active=white
roster.offline.active=white
roster.chat.unread=white
roster.online.unread=white
roster.away.unread=white
roster.xa.unread=white
roster.dnd.unread=white
roster.offline.unread=white
roster.room=white
roster.room.unread=white
roster.room.mention=white
roster.room.trigger=white
occupants.header=white
receipt.sent=white