Files
fish-config/functions/cheat.fish
T
rootiest 02c46ebea7 docs(functions): merge manual-only examples and notes into headers
Folds the examples Section 5 carried but the headers did not into each
function's `# EXAMPLE`, and moves the three lines that only looked like
examples -- the two typo-abbreviation notes and rm's /usr/bin/rm fallback --
into `# NOTES`, the label already in use.

Also corrects gi's synopsis, which omitted -l, and documents yt-dlp's
--no-embed-thumbnail in `# ARGUMENTS`.
2026-07-26 03:47:25 -04:00

31 lines
653 B
Fish

# Copyright (C) 2026 Rootiest
# SPDX-License-Identifier: AGPL-3.0-or-later
# CATEGORY
# 14-miscellaneous
#
# SYNOPSIS
# cheat <topic> [args...]
#
# DESCRIPTION
# Displays colorized cheatsheets using cheat -c. Falls back to tldr, then
# man, if cheat is not installed.
#
# ARGUMENTS
# topic The command or topic to look up
# args... Additional arguments forwarded to cheat, tldr, or man
#
# EXAMPLE
# cheat tar
# cheat git
function cheat --wraps='cheat' --description 'alias cheat=cheat -c'
if type -q cheat
command cheat -c $argv
else if type -q tldr
tldr $argv
else
man $argv
end
end