Fix an issue whereby colorization would output ANSI codes if a pager was
not configured.
The solution here is to stop guessing about the state of the user's
system at runtime, as well as the user's intention. The installer now
chooses an appropriate installer when generating configs, and no longer
bothers searching for pagers at runtime.
Fix an issue whereby ANSI escape characters could appear in search
output when a pager was not configured.
The root cause of the problem was code that was overzealously applying
an underlying effect to search terms.
This commit simply rips out underlying entirely, both as means of
resolving this problem, and also simply for removing needless visual
noise from search output.
Modify `Sheets.Load` to not walk hidden directories like `.git`. This
optimization can potentially prevent thousands of system calls from
being made, because `.git` directories can contain many files.
Bury the `more` pager default on Linux in an effort to work around the
following problem:
https://github.com/cheat/cheat/issues/681#issuecomment-1201842334
We're satisficing for this kludge because it does not appear to be
possible to actually make `more` perform as expected in all
environments.
Fix an issue whereby the installer installed cheatsheets into the wrong
directory on Windows. This occurred because previously `path.Join` was
used where `path/filepath.Join` should have been used.
This matters, because the former always uses `/` as the path separator,
whereas the latter will use `/` or `\` as is appropriate for the
runtime environment.
This should resolve bullet point 4 in #665.
- Update the default config file to use `more` instead of `less` as the
default pager, in order to support Windows out-of-the-box. (#655, #665).
- Use `terminal` Chroma formatter (rather than `terminal16m`) in order
to accommodate less capable terminal emulators like `cmd.exe` by
default. Similarly, default to `colorize: false` in configs (changed
from `true`) (#665).
- Comment out default `style` in order to avoid printing ANSI color
codes into terminals without color support (#665)
- Attempt to intelligently choose a default editor, rather than rely on
a hard-coded `vim` in the configs. This should make it easier to use
`cheat` immediately without needing to specify configs. It should also
improve `cheat`'s Windows compatibility. (#665)