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.
33 lines
819 B
Fish
33 lines
819 B
Fish
# Copyright (C) 2026 Rootiest
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
# CATEGORY
|
|
# 01-file-and-directory
|
|
#
|
|
# SYNOPSIS
|
|
# rg [args...]
|
|
#
|
|
# DESCRIPTION
|
|
# Wraps ripgrep with --hyperlink-format=kitty when running inside Kitty
|
|
# terminal, enabling clickable file links in search results. Falls back
|
|
# to plain rg on other terminals.
|
|
#
|
|
# ARGUMENTS
|
|
# args... Arguments forwarded to ripgrep
|
|
#
|
|
# EXAMPLE
|
|
# rg "TODO" src/
|
|
function rg --description 'alias rg=rg --hyperlink-format=kitty'
|
|
# Opinionated guard (C1): fall back to bare command rg when disabled.
|
|
if not __fish_config_op_enabled __fish_config_op_aliases
|
|
command rg $argv
|
|
return $status
|
|
end
|
|
|
|
if test "$TERM" = xterm-kitty
|
|
command rg --hyperlink-format=kitty $argv
|
|
else
|
|
command rg $argv
|
|
end
|
|
end
|