Skip to content
Open
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
14 changes: 8 additions & 6 deletions srcpkgs/cheat/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'cheat'
pkgname=cheat
version=4.4.2
revision=2
version=5.1.0
revision=1
build_style=go
go_import_path="github.com/cheat/cheat"
go_package="./cmd/cheat"
Expand All @@ -10,12 +10,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/cheat/cheat"
distfiles="https://github.com/cheat/cheat/archive/refs/tags/${version}.tar.gz"
checksum=6968ffdebb7c2a8390dea45f97884af3c623cda6c2d36c4c04443ed2454da431
checksum=5ef8864dacb5b37268d7d26cd01f74b99a33b2e5eb5b290e4221358410c99db4

do_check() {
export EDITOR=/usr/bin/vi
export PAGER=/usr/bin/cat
}

post_install() {
vman doc/cheat.1
vcompletion scripts/cheat.bash bash cheat
vcompletion scripts/cheat.fish fish cheat
vcompletion scripts/cheat.zsh zsh cheat

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elbachir-one elbachir-one Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably generate the completions with vtargetrun: https://github.com/cheat/cheat/blob/b8098dc1b9de846d76e68102e03aeb0f918bb0da/README.md#autocompletion.

Tried:

vtargetrun cheat --completion bash > cheat.bash
vcompletion cheat.bash bash cheat

But it didn't work, giving the following error:

/void-packages/srcpkgs/cheat/template: line 21: vtargetrun: command not found
=> ERROR: cheat-5.1.0_1: post_install: 'vtargetrun cheat --completion bash > cheat.bash' exited with 127
=> ERROR:   in post_install() at srcpkgs/cheat/template:21

I ended up doing it like this instead:

${DESTDIR}/usr/bin/cheat --completion bash > cheat.bash
vcompletion cheat.bash bash cheat

However, that also doesn't work on some builds.

vlicense LICENSE.txt
}