feat: implement --all flag

Implement an `--all` flag that can be used to view cheatsheets on all
chaetpaths. (Resolves #548)
This commit is contained in:
Chris Lane
2020-11-27 16:39:34 -05:00
parent aa16f68620
commit 233a9de1aa
7 changed files with 68 additions and 20 deletions

View File

@ -59,7 +59,13 @@ func Load(cheatpaths []cp.Cheatpath) ([]map[string]sheet.Sheet, error) {
}
// parse the cheatsheet file into a `sheet` struct
s, err := sheet.New(title, path, cheatpath.Tags, cheatpath.ReadOnly)
s, err := sheet.New(
title,
cheatpath.Name,
path,
cheatpath.Tags,
cheatpath.ReadOnly,
)
if err != nil {
return fmt.Errorf(
"failed to load sheet: %s, path: %s, err: %v",