Previously cheat only checked the current working directory for a .cheat
subdirectory. Now it walks upward through ancestor directories, stopping
at the first .cheat directory found. This mirrors how git discovers .git
directories, so users can place .cheat at their project root and have it
work from any subdirectory.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, env vars were only consulted during config generation
and baked into conf.yml. At runtime, the config file value was
always used, making it impossible to override the editor via
environment variables.
Now the precedence is: $VISUAL > $EDITOR > conf.yml > auto-detect.
Closes#589
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add .gitattributes to force LF in mock files (Windows autocrlf)
- Fix parse.go: detect line endings from content instead of runtime.GOOS
- Add fail-fast: false to CI matrix; trigger on all branch pushes
- Skip chmod-based tests on Windows (permissions work differently)
- Use filepath.Join for expected paths in Windows path tests
- Use platform-appropriate invalid paths in error tests
- Add Windows absolute path test case for ValidateSheetName
- Skip Unix-specific integration tests on Windows
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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)
Repairs the `config` unit-tests which were broken with `3.0.4`. It does
so by providing a simple switch that allows us to disable the resolution
of filesystem symlinks when running tests.
- Re-implemented the project in Golang, and deprecated Python entirely
- Implemented several new, long-requested features
- Refactored cheatsheets into a separate repository