aboutsummaryrefslogtreecommitdiff
path: root/commands/terminal/close.go
blob: ded38b95173f5e75c5c1cd38a964fe93db9caedf (plain)
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
package terminal

import (
	"git.sr.ht/~rjarry/aerc/widgets"
)

type Close struct{}

func init() {
	register(Close{})
}

func (Close) Aliases() []string {
	return []string{"close"}
}

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

func (Close) Execute(aerc *widgets.Aerc, args []string) error {
	term, _ := aerc.SelectedTabContent().(*widgets.Terminal)
	term.Close()
	return nil
}