feat(display): make Faint respect Colorize

Make `display.Faint` respect the `Colorize` config value.
This commit is contained in:
Chris Lane
2020-11-27 22:50:55 -05:00
parent cdddfbb516
commit 1a7b5c6127
4 changed files with 29 additions and 6 deletions

View File

@ -77,7 +77,7 @@ func cmdSearch(opts map[string]interface{}, conf config.Config) {
// display the cheatsheet title and path
out += fmt.Sprintf("\n%s %s\n",
display.Underline(sheet.Title),
display.Faint(fmt.Sprintf("(%s)", sheet.CheatPath)),
display.Faint(fmt.Sprintf("(%s)", sheet.CheatPath), conf),
)
// indent each line of content

View File

@ -41,7 +41,7 @@ func cmdView(opts map[string]interface{}, conf config.Config) {
// identify the matching cheatsheet
fmt.Println(fmt.Sprintf("%s %s",
display.Underline(sheet.Title),
display.Faint(fmt.Sprintf("(%s)", sheet.CheatPath)),
display.Faint(fmt.Sprintf("(%s)", sheet.CheatPath), conf),
))
// apply colorization if requested