From 0c47f44ff9099244502a211b162b4029796051da Mon Sep 17 00:00:00 2001 From: Christopher Allen Lane Date: Mon, 8 Aug 2022 19:45:32 -0400 Subject: [PATCH] fix: no colorization on default install (#687) Fix an issue whereby a default installation (as created by the installer) would (seemingly) fail to output colorized text, even when the `-c` flag was passed. The root cause of the problem was that the installer did not set a default `style` for `chroma`, which in turn defaulted to using the `bw` (black-and-white) style. Thus, colorization actually *was* being applied with `-c` - it was simply black and white! --- cmd/cheat/str_config.go | 5 ++--- configs/conf.yml | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmd/cheat/str_config.go b/cmd/cheat/str_config.go index 02beccb..72a7649 100644 --- a/cmd/cheat/str_config.go +++ b/cmd/cheat/str_config.go @@ -17,11 +17,11 @@ colorize: false # Which 'chroma' colorscheme should be applied to the output? # Options are available here: # https://github.com/alecthomas/chroma/tree/master/styles -# style: monokai +style: monokai # Which 'chroma' "formatter" should be applied? # One of: "terminal", "terminal256", "terminal16m" -formatter: terminal +formatter: terminal256 # Through which pager should output be piped? # 'less -FRX' is recommended on Unix systems @@ -41,7 +41,6 @@ pager: PAGER_PATH # commands. So, if you want to view the 'tar' cheatsheet that is tagged as # 'community' rather than your own, you can use: cheat tar -t community cheatpaths: - # Paths that come earlier are considered to be the most "global", and will # thus be overridden by more local cheatsheets. That being the case, you # should probably list community cheatsheets first. diff --git a/configs/conf.yml b/configs/conf.yml index c18797d..4fb1d77 100644 --- a/configs/conf.yml +++ b/configs/conf.yml @@ -8,11 +8,11 @@ colorize: false # Which 'chroma' colorscheme should be applied to the output? # Options are available here: # https://github.com/alecthomas/chroma/tree/master/styles -# style: monokai +style: monokai # Which 'chroma' "formatter" should be applied? # One of: "terminal", "terminal256", "terminal16m" -formatter: terminal +formatter: terminal256 # Through which pager should output be piped? # 'less -FRX' is recommended on Unix systems @@ -32,7 +32,6 @@ pager: PAGER_PATH # commands. So, if you want to view the 'tar' cheatsheet that is tagged as # 'community' rather than your own, you can use: cheat tar -t community cheatpaths: - # Paths that come earlier are considered to be the most "global", and will # thus be overridden by more local cheatsheets. That being the case, you # should probably list community cheatsheets first.