diff options
Diffstat (limited to 'commands/patch')
-rw-r--r-- | commands/patch/term.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/commands/patch/term.go b/commands/patch/term.go new file mode 100644 index 00000000..f2c50b15 --- /dev/null +++ b/commands/patch/term.go @@ -0,0 +1,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) +} |