aboutsummaryrefslogblamecommitdiffstats
path: root/commands/patch/term.go
blob: f9f79be1bc49bc3afb34b43a8d2d2db6da5a7681 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                 



                                               










                                                        
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) Context() commands.CommandContext {
	return commands.GLOBAL
}

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)
}