4c51ef7a33
Records each documented function's manual category in its own header, so Section 5 can later be generated from source instead of hand-maintained alongside it. Values reproduce the current grouping in docs/manual/05-functions/ exactly; no documentation changes meaning here. Four functions are skipped because they have no header at all yet (branch, fc, gitup, sudo-toggle); they get one in the merge that follows.
30 lines
639 B
Fish
30 lines
639 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
|
|
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
|