Christopher Allen Lane and Claude Opus 4.6
b604027205
fix: make tests pass on macOS CI runners
...
- Resolve symlinks in temp dir paths (macOS /var -> /private/var)
- Pre-create non-empty community dir to ensure clone fails reliably
regardless of network access on CI runners
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-14 21:05:16 -05:00
Christopher Allen Lane and Claude Opus 4.6
2a19755804
chore: modernize CI and update Go toolchain
...
- Bump Go from 1.19 to 1.26 and update all dependencies
- Rewrite CI workflow with matrix strategy (Linux, macOS, Windows)
- Update GitHub Actions to current versions (checkout@v4, setup-go@v5)
- Update CodeQL actions from v1 to v3
- Fix cross-platform bug in mock/path.go (path.Join -> filepath.Join)
- Clean up dependabot config (weekly schedule, remove stale ignore)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-14 20:58:51 -05:00
Christopher Allen Lane and Claude Opus 4.6
cc85a4bdb1
chore: bump version to 4.5.0
...
Bug fixes:
- Fix inverted pager detection logic (returned error instead of path)
- Fix repo.Clone ignoring destination directory parameter
- Fix sheet loading using append on pre-sized slices
- Clean up partial files on copy failure
- Trim whitespace from editor config
Security:
- Add path traversal protection for cheatsheet names
Performance:
- Move regex compilation outside search loop
- Replace string concatenation with strings.Join in search
Build:
- Remove go:generate; embed config and usage as string literals
- Parallelize release builds
- Add fuzz testing infrastructure
Testing:
- Improve test coverage from 38.9% to 50.2%
- Add fuzz tests for search, filter, tags, and validation
Documentation:
- Fix inaccurate code examples in HACKING.md
- Add missing --conf and --all options to man page
- Add ADRs for path traversal, env parsing, and search parallelization
- Update CONTRIBUTING.md to reflect project policy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-14 19:56:19 -05:00
Chris Allen Lane and GitHub
7908a678df
Merge pull request #742 from cheat/dependabot/go_modules/github.com/cloudflare/circl-1.3.7
...
chore(deps): bump github.com/cloudflare/circl from 1.3.6 to 1.3.7
2024-01-08 15:34:48 -05:00
Chris Allen Lane and GitHub
4bf804ac60
Merge pull request #741 from cheat/dependabot/go_modules/golang.org/x/crypto-0.17.0
...
chore(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0
2023-12-19 14:51:50 -05:00
Christopher Allen Lane
d34177729d
chore: bump version to 4.4.2
2023-12-15 12:48:39 -05:00
Chris Allen Lane and GitHub
7fa50328d7
Merge pull request #740 from chrisallenlane/chroma
...
chore(deps): bump chroma to v2 #735
2023-12-13 12:59:52 -05:00
Christopher Allen Lane
1790aec85d
chore(deps): bump chroma to v2 #735
...
Bump `alecthomas/chroma` to `v2`:
https://github.com/cheat/cheat/issues/735
2023-12-13 12:54:32 -05:00
Christopher Allen Lane
242da8c89a
chore(build): remove plan9 support
...
Remove `plan9` support from the `Makefile` because the executable now
fails to build.
2023-12-13 09:45:21 -05:00
Chris Allen Lane and GitHub
2294f40ee0
Merge pull request #739 from chrisallenlane/v4.4.1
...
V4.4.1
2023-12-13 09:17:16 -05:00
Christopher Allen Lane
fe25019b14
chore: bump version to 4.4.1
2023-12-13 09:12:14 -05:00
Christopher Allen Lane
bfb071c0b2
chore(lint): various changes to appease revive
...
- Add `package` comments
- Rename `opts` to `_` where unused
2023-12-13 09:10:20 -05:00
Christopher Allen Lane
95a4e31b6c
chore(deps): upgrade dependencies
...
Upgrade all dependencies to newest versions.
2023-12-13 08:29:02 -05:00
Chris Allen Lane and GitHub
0d9c92c8c0
Merge pull request #707 from chrisallenlane/v4.4.0
...
V4.4.0
2022-11-05 13:11:22 -04:00
Christopher Allen Lane
16c50bb659
chore: bump version to 4.4.0
2022-11-05 12:56:43 -04:00
Christopher Allen Lane
1a85c9e9c8
feat: platform compatibility
...
Add experimental support for the following platforms:
- aix
- dragonfly
- illumos
- ios
- netbsd
- openbsd
- plan9
- solaris
2022-11-05 12:00:43 -04:00
Christopher Allen Lane
c9ccefa607
chore(deps): remove yaml.v1
...
Remove errant `yaml.v1` dependency, and use `yaml.v2` everywhere.
2022-11-05 11:39:48 -04:00
Christopher Allen Lane
3a6b6e58f0
chore(deps): update dependencies
...
`make vendor-update`
2022-11-05 10:15:15 -04:00
Christopher Allen Lane
2edc0ee299
chore: add a comment
...
Add a small comment regarding a tricky edge-case in `gitdir.go`.
2022-08-28 06:54:29 -04:00
Chris Allen Lane and GitHub
bd9fa1ba70
Merge pull request #700 from chrisallenlane/4.3.3
...
4.3.3
2022-08-27 22:07:19 -04:00
Christopher Allen Lane
bb85e611f4
chore: bump version to 4.3.3
2022-08-27 21:29:06 -04:00
Christopher Allen Lane
a2f538f114
refactor(repo): create repo package
...
- Refactor `installer.clone` into new `repo.Clone` package and method.
- Refactor `sheets.isGitDir` into `repo.GitDir`.
Both of these changes read better, and will facilitate cleaner
architecture when `--update` is implemented.
2022-08-27 21:02:48 -04:00
Christopher Allen Lane
80c91cbdee
feat(installer): use go-git to clone
...
Integrate `go-git` into the application, and use it to `git clone`
cheatsheets when the installer runs.
Previously, the installer required that `git` be installed on the system
`PATH`, so this change has to big advantages:
1. It removes that system dependency on `git`
2. It paves the way for implementing the `--update` command
Additionally, `cheat` now performs a `--depth=1` clone when installing
cheatsheets, which should at least somewhat improve installation times
(especially on slow network connections).
2022-08-27 21:00:46 -04:00
Christopher Allen Lane
ede2d2dbaa
fix(Sheets): .gitignore in cheatpath ( #699 )
...
Fix an issue whereby `cheat` would crash if a cheatpath contained a file
that began with `.git`, like `.gitignore`.
2022-08-27 20:57:07 -04:00
Chris Allen Lane and GitHub
db3d7e53a4
Merge pull request #698 from chrisallenlane/4.3.2
...
4.3.2
2022-08-26 14:07:14 -04:00
Christopher Allen Lane
06c4ff52fc
chore: bump version to 4.3.2
2022-08-26 13:56:35 -04:00
Christopher Allen Lane
cbc2638d96
fix(docopt): whitespace typo in --help output
...
Fix a whitespace (alignment) typo in the `--help` output.
2022-08-26 13:56:35 -04:00
Christopher Allen Lane
fd93da799d
fix(sheets): cheatsheets in submodules ( #694 )
...
Resolve an issue whereby cheatsheets contained within `git` submodules
were ignored due to a regression introduced in `4.3.1`.
2022-08-26 13:55:09 -04:00
Christopher Allen Lane
5c5ed7344f
chore(docs): improve configuration docs ( #656 )
...
Improve the configuration documentation in `configs/conf.yml` (#656 ).
2022-08-26 13:55:09 -04:00
Christopher Allen Lane
d773383f70
fix(build): Makefile corrections
...
- Fix an issue whereby `make clean` filed to remove assets created by
`make generate`.
- Fix a subsequent issue whereby `make generate` was being run too late
in the `make build` target, which resulted in a build failure.
2022-08-26 13:55:09 -04:00
Christopher Allen Lane
2717044b62
chore(docs): update INSTALLING.md ( #677 )
...
Update `INSTALLING.md` with more package information. See: #677
2022-08-26 13:55:09 -04:00
Christopher Allen Lane
2d635293c5
refactor(Sheet): create parse method
...
Move `Frontmatter.Parse` to `Sheet.parse`, and delete the `frontmatter`
package. `Sheet.parse` more accurately describes the parser's behavior.
2022-08-26 13:55:09 -04:00
Christopher Allen Lane
f0bfeda47a
fix(frontmatter): do not trim whitespace ( #663 )
...
Do not strip leading or trailing newlines. Doing so had interferred with
users' intended cheatsheet layouts.
2022-08-26 13:55:09 -04:00
Christopher Allen Lane
f1540290a7
chore(deps): update dependencies
2022-08-26 11:06:21 -04:00
Chris Allen Lane and GitHub
0b80a608c3
Merge pull request #692 from chrisallenlane/4.3.1
...
4.3.1
2022-08-08 21:01:56 -04:00
Christopher Allen Lane
3c1e24a0e8
chore: bump version to 4.3.1
2022-08-08 20:38:23 -04:00
Christopher Allen Lane
2a6586b41b
fix(installer): always use more pager on Windows
2022-08-08 20:38:23 -04:00
Christopher Allen Lane
6421953183
feat(installer): set default editor
...
Attempt to set and locate a default editor when running the installer.
2022-08-08 20:14:27 -04:00
Christopher Allen Lane
0c47f44ff9
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!
2022-08-08 19:45:32 -04:00
Christopher Allen Lane
77f9c3fdd0
fix(Sheets): cheatsheets in hidden directories ( #690 )
...
Fix an issue whereby cheatsheets that were contained within hidden
directories were prevented from being loaded.
2022-08-08 19:17:59 -04:00
Chris Allen Lane and GitHub
b53a14b1a7
Merge pull request #691 from chrisallenlane/4.3.0
...
4.3.0
2022-08-07 14:45:27 -04:00
Christopher Allen Lane
f1e8602369
chore: bump version to 4.3.0
2022-08-07 14:11:47 -04:00
Christopher Allen Lane
ddbe710881
feat: add the --conf command
...
Add the `--conf` command, which dipslay's the current `cheat`
configuration file path.
2022-08-07 14:08:25 -04:00
Christopher Allen Lane
d598d96fce
fix(Config): colorization without pager ( #687 )
...
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.
2022-08-07 10:19:56 -04:00
Christopher Allen Lane
4fdec50487
chore(deps): upgrade dependencies
...
- Upgrade to Go 1.19 in `go.mod`
- Upgrade dependencies
2022-08-07 10:19:56 -04:00
Chris Allen Lane and GitHub
9de866dfb6
Merge pull request #689 from chrisallenlane/ci
...
chore(ci): YAML lints
2022-08-05 07:53:53 -04:00
Christopher Allen Lane
eb99a070ce
chore: CI template nits
...
- Fix YAML nits per `yamllint`
- Upgrade Go version to `1.19`
2022-08-05 07:49:20 -04:00
Chris Allen Lane and GitHub
73f80bde48
Merge pull request #688 from chrisallenlane/4.2.7
...
4.2.7
2022-08-05 07:01:51 -04:00
Chris Allen Lane
8130b2f3bd
chore: bump version to 4.2.7
2022-08-05 06:41:16 -04:00
Christopher Allen Lane
f4e6c76e58
fix: escape sequences in search output ( #687 )
...
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.
2022-08-05 06:41:16 -04:00
Chris Allen Lane and Chris Lane
85f5ae8ec7
chore: various lint corrections
...
Make various lint corrections in order to appease `staticcheck`.
2022-08-04 20:43:50 -04:00
Chris Allen Lane and Chris Lane
484b447391
perf(Sheets): do not walk hidden directories
...
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.
2022-08-04 20:43:42 -04:00
Chris Allen Lane and GitHub
cfd1702bc6
Merge pull request #685 from chrisallenlane/page-bug
...
Fix #681
2022-08-02 20:37:48 -04:00
Christopher Allen Lane
7406ebfb5e
chore(deps): update dependencies
2022-08-02 20:30:31 -04:00
Christopher Allen Lane
0737af2fec
fix: pagination error on Linux
...
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.
2022-08-02 20:27:56 -04:00
Christopher Allen Lane
a23d372d1f
docs(INSTALLING): nix link
...
Update the `nix` package information.
2022-07-06 08:11:42 -04:00
Chris Allen Lane and GitHub
fe66ff3768
Merge pull request #679 from chrisallenlane/hacking-md
...
docs: create `HACKING.md`
2022-07-05 15:11:09 -04:00
Christopher Allen Lane
7fed1f63a6
docs: create HACKING.md
...
Create a `HACKING.md` file for onboarding new developers to `cheat`.
2022-07-05 15:07:34 -04:00
Christopher Allen Lane
a297d1619c
chore(build): remove make docker-run
...
Remove the `docker-run` `make` target, which was added in haste. It was
entirely redundant with `docker-sh`.
2022-07-05 14:40:15 -04:00
Chris Allen Lane and GitHub
ef1da90a77
Merge pull request #678 from chrisallenlane/go-install
...
Build/CI corrections
2022-07-05 12:24:48 -04:00
Christopher Allen Lane
d8f405c112
chore(ci): use Go 1.18 in CI
...
Use Go 1.18 in the CI pipeline.
2022-07-05 11:59:08 -04:00
Chris Allen Lane and GitHub
f8403ff241
Merge pull request #676 from chrisallenlane/install-md
...
docs: create `INSTALLING.md`
2022-07-05 11:24:02 -04:00
Christopher Allen Lane
65f6be3fd8
docs: create INSTALLING.md
...
- Create `INSTALLING.md`
- Update the `README.md`
2022-07-05 11:19:40 -04:00
Chris Allen Lane and GitHub
1cb53697d2
Merge pull request #674 from cheat/4.2.5
...
4.2.5
2022-07-04 22:37:19 -04:00
Christopher Allen Lane
14f321b0e6
chore: bump version to 4.2.5
2022-07-04 22:00:35 -04:00
Christopher Allen Lane
d3250fda79
chore(deps): upgrade vendored dependencies
2022-07-04 22:00:35 -04:00
Chris Allen Lane and GitHub
fe8f39013e
Merge pull request #673 from chrisallenlane/win-compat
...
fix: Windows compatibility
2022-07-04 17:03:11 -04:00
Christopher Allen Lane
1016b20ef2
chore: bump version to 4.2.4
...
Bump version to `4.2.4`. This version contains numerous Windows fixes
and improvements.
2022-07-04 16:58:58 -04:00
Christopher Allen Lane
def8985dcd
fix: Windows support
...
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 .
2022-07-04 16:55:57 -04:00
Christopher Allen Lane
e6f12147df
fix: config fixes for Windows
...
- 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 )
2022-07-04 16:06:37 -04:00
Christopher Allen Lane
a8c2c396ed
feat(build): crate docker-run target
...
Create a `docker-run` `make` target for opening a shell in an Alpine
container for development.
2022-07-04 13:13:27 -04:00
Christopher Allen Lane
35262df4f2
fix(build): Windows executable packaging
...
Fix an issue whereby the Windows zip release contained an extraneous
(and annoying) `dist` parent directory.
2022-07-04 12:34:06 -04:00
Chris Allen Lane and GitHub
12ffa4cb5c
Merge pull request #644 from cheat/develop
...
Windows fixes, Android support
2021-10-09 12:13:01 -04:00
Chris Allen Lane and GitHub
d9c602f9e1
Merge pull request #643 from chrisallenlane/android
...
fix(Paths): Android support
2021-10-09 11:30:18 -04:00
Christopher Allen Lane
b67ff8b6a8
fix(Paths): Android support
...
Add `"android"` to the explicit whitelist of supported operating
systems. This may resolve incompatibilities with certain Android
environments.
2021-10-09 11:27:38 -04:00
Christopher Allen Lane
a500a621a1
chore: bump version
...
Bump version to 4.2.3.
2021-10-09 10:59:02 -04:00
Chris Allen Lane and GitHub
23b6928874
Merge pull request #639 from mattn/fix-windows
...
Fix Windows
2021-10-09 10:10:39 -04:00
Chris Allen Lane and GitHub
9de39fb12b
Merge pull request #634 from cheat/dependabot/go_modules/github.com/mattn/go-isatty-0.0.14
...
chore(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14
2021-10-09 09:51:49 -04:00
Chris Allen Lane and GitHub
ad501c4cbe
Merge pull request #641 from OmgImAlexis/patch-1
...
chore: fix typo in comment
2021-10-09 09:39:41 -04:00
Christopher Allen Lane
f17de401e5
docs(CONTRIBUTING): pr against develop
...
Add a note to `CONTRIBUTING.md` requesting that contributors open
pull-requests against the `develop` branch.
2021-10-09 09:34:23 -04:00
Chris Lane
768d55e5d4
chore: bump version
...
Bump version to `4.2.2`.
2021-06-08 21:02:03 -04:00
Chris Lane
6aedc5c116
chore: whitespace edit on Makefile
2021-06-08 20:59:57 -04:00
Chris Lane
e881bb1f97
chore: update go.sum
2021-06-08 20:59:57 -04:00
Chris Lane
501f9c66ad
deps: upgrade dependencies
2021-06-08 20:59:57 -04:00
Chris Allen Lane and GitHub
17acefdd9b
Merge pull request #617 from bernermic/master
...
Adds some git helper scripts
2021-05-14 12:21:26 -04:00
Chris Allen Lane
86967873a8
Merge pull request #623 from cheat/github-actions
...
chore: migrate into Github Actions
2021-05-03 17:02:27 -04:00
Chris Lane
d237d98c15
chore: migrate into Github Actions
...
Replace Travis CI integration in favor of Github Actions.
2021-05-03 16:43:27 -04:00
Chris Allen Lane and GitHub
eb9b3e7798
Merge pull request #624 from cheat/dependabot/add-v2-config-file
...
chore: upgrade to GitHub-native Dependabot
2021-05-03 14:32:08 -04:00
Chris Allen Lane and GitHub
1eb44e8809
Merge pull request #621 from chrisallenlane/v4.2.1
...
Squashed commit of the following:
2021-04-28 12:55:17 -04:00
Chris Lane
55b18b4897
Squashed commit of the following:
...
commit 95479c8ad744db48386a5c78e54ef8da80e9120b
Author: Chris Lane <chris@chris-allen-lane.com >
Date: Wed Apr 28 12:26:32 2021 -0400
chore(version): bump version to 4.2.1
commit 6956f51cae
Author: Chris Lane <chris@chris-allen-lane.com >
Date: Wed Apr 28 12:24:21 2021 -0400
fix(Makefile): `vendor-update`
Update the `vendor-update` build target to run `go mod vendor` after
updating dependencies.
commit 0aca411279
Author: Chris Lane <chris@chris-allen-lane.com >
Date: Wed Apr 28 12:23:24 2021 -0400
chore(deps): update dependencies
commit e847956b02
Author: Chris Lane <chris@chris-allen-lane.com >
Date: Wed Apr 28 08:26:51 2021 -0400
chore(deps): build updates
- Upgrade `go` to `1.16.3`
- Attempt to fix build errors regarding dependencies
2021-04-28 12:35:32 -04:00
Chris Allen Lane and GitHub
883a17092f
Merge pull request #606 from chrisallenlane/4.2.0
...
4.2.0
2020-11-28 11:27:09 -05:00
Chris Lane
4f2a57fce8
fix(view): whitespace corrections
...
- Fix bug whereby `--all` flag would conflict with pager
- Fix whitespace inconsistencies among view and search outputs
2020-11-28 11:18:16 -05:00
Chris Lane
ecc96c64f9
refactor(installer): externalize installer
...
Move installation-related code out of `main.go` and into a new
`installer.Run` method.
2020-11-28 10:32:37 -05:00
Chris Lane
a81dd96ff4
fix: rename display.go
...
Rename `display.go` to `write.go`. (I forgot to do this previously.)
2020-11-27 23:05:02 -05:00
Chris Lane
fb538baba5
chore(version): bump to 4.2.0
2020-11-27 22:57:25 -05:00
Chris Lane
1a7b5c6127
feat(display): make Faint respect Colorize
...
Make `display.Faint` respect the `Colorize` config value.
2020-11-27 22:50:55 -05:00
Chris Lane
cdddfbb516
chore: rename display.Display
...
Rename `display.Display` to `display.Write` for clarity and to reduce
"stutter".
2020-11-27 22:35:24 -05:00
Chris Lane
4ef4c35d8c
feat(search): search all cheatpaths
...
Update the search function. It now searches all cheatpaths all the time,
as if `--all` were implicitly passed.
2020-11-27 22:31:16 -05:00
Chris Lane
a58294859e
chore: spelling
...
`s/pathSheets/pathsheets/g` in `cmd_list` for consistency elsewhere.
2020-11-27 22:26:14 -05:00
Chris Lane
606092e288
feat(search): improve search output formatting
...
Improve the search output formatting.
2020-11-27 17:06:02 -05:00