~sircmpwn/aerc

ref: 0.1.1 aerc/commands/help.go -rw-r--r-- 360 bytes
eabdcff8Jonas Kalderstam Added config file to Make clean 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package commands

import (
	"errors"

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

func init() {
	register("help", Help)
}

func Help(aerc *widgets.Aerc, args []string) error {
	page := "aerc"
	if len(args) == 2 {
		page = "aerc-" + args[1]
	} else if len(args) > 2 {
		return errors.New("Usage: help [topic]")
	}
	return Term(aerc, []string{"term", "man", page})
}