aboutsummaryrefslogtreecommitdiffstats
path: root/commands/patch/term.go
blob: f2c50b15b5186dfef46ef1c01e26f02268f0e13c (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
package patch

import (
	"git.sr.ht/~rjarry/aerc/commands"
	"git.sr.ht/~rjarry/aerc/lib/pama"
)

type Term struct {
	Cmd []string `opt:"..." required:"false"`
}

func init() {
	register(Term{})
}

func (Term) Aliases() []string {
	return []string{"term"}
}

func (t Term) Execute(_ []string) error {
	p, err := pama.New().CurrentProject()
	if err != nil {
		return err
	}
	return commands.TermCoreDirectory(t.Cmd, p.Root)
}