app-misc/cheat - 4.2.3 (guru)

Search

Install

Install this version:

emerge -a =app-misc/cheat-4.2.3

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =app-misc/cheat-4.2.3

Or alternatively:

emerge --autounmask-write -a =app-misc/cheat-4.2.3

Package Information

Description:
cheat allows you to create and view interactive cheatsheets on the command-line
Homepage:
https://github.com/cheat/cheat
License:
MIT Apache-2.0 BSD BSD-2

Ebuild Details

Version EAPI Keywords Slot
4.2.3 8 ~amd64 ~x86 0
View Raw Ebuild
# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit shell-completion go-module optfeature

DESCRIPTION="cheat allows you to create and view interactive cheatsheets on the command-line"
HOMEPAGE="https://github.com/cheat/cheat"
SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

# licenses present in the final built
# software. Checked with dev-go/golicense
LICENSE="MIT Apache-2.0 BSD BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="man zsh-completion"

RDEPEND="zsh-completion? ( !app-shells/zsh-completions )"
BDEPEND="man? ( app-text/pandoc )"

src_compile() {
	ego build -o ${PN} ./cmd/${PN}

	if use man; then
		pandoc -s -t man doc/${PN}.1.md -o doc/${PN}.1 || die "building manpage failed"
	fi
}

src_test() {
	ego test ./cmd/${PN}
}

src_install() {
	dobin ${PN}

	use man && doman doc/${PN}.1

	newbashcomp scripts/${PN}.bash ${PN}
	dofishcomp "scripts/$PN.fish"

	if use zsh-completion; then
		mv "scripts/${PN}.zsh" "scripts/_${PN}"
		newzshcomp "scripts/${PN}.zsh" "_${PN}"
	fi
}

pkg_postinst() {
	optfeature "fzf integration" app-shells/fzf
}

USE Flags

Manage flags for this package: euse -i <flag> -p app-misc/cheat | euse -E <flag> -p app-misc/cheat | euse -D <flag> -p app-misc/cheat

Global/Standard Flags

man

Inherited Eclasses

Dependencies

RDEPEND

zsh-completion? ( !app-shells/zsh-completions )

BDEPEND

man? ( app-text/pandoc )

Manifest for 4.2.3

Type File Size Source URLs
DIST cheat-4.2.3.tar.gz 1615016 bytes https://github.com/cheat/cheat/archive/4.2.3.tar.gz