Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/workflows/homebrew.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NB: this image isn't used anywhere in the build pipeline. It exists to
# conveniently facilitate ad-hoc experimentation in a sandboxed environment
# during development.
FROM golang:1.15-alpine
FROM golang:1.26-alpine

RUN apk add git less make

Expand Down
4 changes: 2 additions & 2 deletions INSTALLING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ On Unix-like systems, you may simply paste the following snippet into your termi

```sh
cd /tmp \
&& wget https://github.com/cheat/cheat/releases/download/4.5.0/cheat-linux-amd64.gz \
&& wget https://github.com/cheat/cheat/releases/download/4.5.1/cheat-linux-amd64.gz \
&& gunzip cheat-linux-amd64.gz \
&& chmod +x cheat-linux-amd64 \
&& sudo mv cheat-linux-amd64 /usr/local/bin/cheat
```

You may need to need to change the version number (`4.5.0`) and the archive
You may need to need to change the version number (`4.5.1`) and the archive
(`cheat-linux-amd64.gz`) depending on your platform.

See the [releases page][releases] for a list of supported platforms.
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ZIP := zip -m
docker_image := cheat-devel:latest

# build flags
export CGO_ENABLED := 0
BUILD_FLAGS := -ldflags="-s -w" -mod vendor -trimpath
GOBIN :=
TMPDIR := /tmp
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ tags: [ array, map ]
const squares = [1, 2, 3, 4].map(x => x * x);
```

Syntax highlighting is provided by [Chroma][], and the `syntax` value may be
set to any lexer name that Chroma supports. See Chroma's [supported
languages][] for a complete list.

The `cheat` executable includes no cheatsheets, but [community-sourced
cheatsheets are available][cheatsheets]. You will be asked if you would like to
install the community-sourced cheatsheets the first time you run `cheat`.
Expand Down Expand Up @@ -189,5 +193,7 @@ Additionally, `cheat` supports enhanced autocompletion via integration with
[Releases]: https://github.com/cheat/cheat/releases
[cheatsheets]: https://github.com/cheat/cheatsheets
[completions]: https://github.com/cheat/cheat/tree/master/scripts
[fzf]: https://github.com/junegunn/fzf
[go]: https://golang.org
[Chroma]: https://github.com/alecthomas/chroma
[supported languages]: https://github.com/alecthomas/chroma#supported-languages
[fzf]: https://github.com/junegunn/fzf
[go]: https://golang.org
14 changes: 14 additions & 0 deletions cmd/cheat/cmd_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ func cmdInit() {
configs = strings.Replace(configs, "EDITOR_PATH", editor, -1)
}

// comment out the community cheatpath by default, since the directory
// won't exist until the user clones it
configs = strings.Replace(configs,
" - name: community\n"+
" path: "+community+"\n"+
" tags: [ community ]\n"+
" readonly: true",
" #- name: community\n"+
" # path: "+community+"\n"+
" # tags: [ community ]\n"+
" # readonly: true",
-1,
)

// output the templated configs
fmt.Println(configs)
}
5 changes: 3 additions & 2 deletions cmd/cheat/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
// configs returns the default configuration template
func configs() string {
return `---
# The editor to use with 'cheat -e <sheet>'. Defaults to $EDITOR or $VISUAL.
# The editor to use with 'cheat -e <sheet>'. Overridden by $VISUAL or $EDITOR.
editor: EDITOR_PATH

# Should 'cheat' always colorize output?
Expand Down Expand Up @@ -56,7 +56,8 @@ cheatpaths:
tags: [ work ]
readonly: false

# Community cheatsheets are stored here by default:
# Community cheatsheets (https://github.com/cheat/cheatsheets):
# To install: git clone https://github.com/cheat/cheatsheets COMMUNITY_PATH
- name: community
path: COMMUNITY_PATH
tags: [ community ]
Expand Down
Loading