refactor(config): migrate C1 aliases call sites to self-identifying guard

This commit is contained in:
2026-08-17 21:12:56 -04:00
parent 77c68558b2
commit 04fd832974
19 changed files with 120 additions and 18 deletions
+48
View File
@@ -0,0 +1,48 @@
# Copyright (C) 2026 Rootiest
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# GENERATED FILE --- do not edit by hand.
# Regenerate with __fish_config_op_registry_rebuild after editing a
# # COMPONENT header, or automatically via docs/build-manual.py.
# Source: docs/generate_component_registry.py
set -g __fish_config_op_registry_keys \
agy: \
bash: \
cat: \
claude: \
du: \
edit: \
help: \
less: \
ls: \
mkdir: \
mv: \
ping: \
rg: \
rm: \
ssh: \
top: \
yt-dlp: \
zoxide:
set -g __fish_config_op_registry_values \
"aliases/dev-tools" \
"aliases/shell-tools" \
"aliases/filesystem" \
"aliases/dev-tools" \
"aliases/filesystem" \
"aliases/dev-tools" \
"aliases/shell-tools" \
"aliases/shell-tools" \
"aliases/filesystem" \
"aliases/filesystem" \
"aliases/filesystem" \
"aliases/network" \
"aliases/search" \
"aliases/filesystem" \
"aliases/network" \
"aliases/monitor" \
"aliases/network" \
"aliases/filesystem"
+4 -1
View File
@@ -5,6 +5,9 @@
# │ help config wrapper │ # │ help config wrapper │
# ╰──────────────────────────────────────────────────────────╯ # ╰──────────────────────────────────────────────────────────╯
# #
# COMPONENT
# aliases/shell-tools
#
# SYNOPSIS # SYNOPSIS
# help [topic] [sub-topic...] # help [topic] [sub-topic...]
# help config [section] [-w|--html] [-m|--man] [-h|--help] # help config [section] [-w|--html] [-m|--man] [-h|--help]
@@ -50,7 +53,7 @@ end
# --- Wrapper Definition --- # --- Wrapper Definition ---
function help --wraps help --description "Custom wrapper to intercept 'help config'" function help --wraps help --description "Custom wrapper to intercept 'help config'"
# Opinionated guard (C1): fall back to the native fish help when disabled. # Opinionated guard (C1): fall back to the native fish help when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
__original_help $argv __original_help $argv
return $status return $status
end end
+4 -1
View File
@@ -3,6 +3,9 @@
# Adapted from icezyclon/zoxide.fish (MIT) # Adapted from icezyclon/zoxide.fish (MIT)
# Heavily customized for Fish 4.x compatibility and performance # Heavily customized for Fish 4.x compatibility and performance
# COMPONENT
# aliases/filesystem
if status is-interactive if status is-interactive
if type -q zoxide if type -q zoxide
@@ -65,7 +68,7 @@ if status is-interactive
# Shadowing cd with zoxide is opinionated (C1 aliasing); z and zi # Shadowing cd with zoxide is opinionated (C1 aliasing); z and zi
# remain available either way. # remain available either way.
if __fish_config_op_enabled __fish_config_op_aliases if __fish_config_op_enabled (status basename)
alias cd=z alias cd=z
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 12-ai-and-developer-tools # 12-ai-and-developer-tools
# #
# COMPONENT
# aliases/dev-tools
#
# DEPENDENCIES # DEPENDENCIES
# agents-init # agents-init
# #
@@ -35,7 +38,7 @@
# agy -i "initial prompt" # agy -i "initial prompt"
# agy models # agy models
function agy --wraps=agy --description 'agy wrapper: auto-initializes AGENTS/ sub-repo before launch' function agy --wraps=agy --description 'agy wrapper: auto-initializes AGENTS/ sub-repo before launch'
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command agy $argv command agy $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 14-miscellaneous # 14-miscellaneous
# #
# COMPONENT
# aliases/shell-tools
#
# SYNOPSIS # SYNOPSIS
# bash [args...] # bash [args...]
# #
@@ -18,7 +21,7 @@
# bash # bash
function bash --wraps='bash' --description 'bash switches to bash shell' function bash --wraps='bash' --description 'bash switches to bash shell'
# Opinionated guard (C1): fall back to bare command bash when disabled. # Opinionated guard (C1): fall back to bare command bash when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command bash $argv command bash $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 01-file-and-directory # 01-file-and-directory
# #
# COMPONENT
# aliases/filesystem
#
# SYNOPSIS # SYNOPSIS
# cat [args...] # cat [args...]
# #
@@ -21,7 +24,7 @@
# cat ~/projects/myapp # cat ~/projects/myapp
function cat --wraps='bat' --description 'Use bat for files, ls for directories, and raw cat for ANSI logs' function cat --wraps='bat' --description 'Use bat for files, ls for directories, and raw cat for ANSI logs'
# Opinionated guard (C1): fall back to bare command cat when disabled. # Opinionated guard (C1): fall back to bare command cat when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command cat $argv command cat $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 12-ai-and-developer-tools # 12-ai-and-developer-tools
# #
# COMPONENT
# aliases/dev-tools
#
# DEPENDENCIES # DEPENDENCIES
# agents-init # agents-init
# #
@@ -33,7 +36,7 @@
# claude --resume # claude --resume
# claude "Explain the recent changes" # claude "Explain the recent changes"
function claude --wraps=claude --description 'claude wrapper: auto-links AGENTS.md as CLAUDE.md' function claude --wraps=claude --description 'claude wrapper: auto-links AGENTS.md as CLAUDE.md'
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command claude $argv command claude $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 01-file-and-directory # 01-file-and-directory
# #
# COMPONENT
# aliases/filesystem
#
# SYNOPSIS # SYNOPSIS
# du [--disk|--dir|--dua] [args...] # du [--disk|--dir|--dua] [args...]
# #
@@ -23,7 +26,7 @@
# du --disk # du --disk
function du --description 'Execute du' function du --description 'Execute du'
# Opinionated guard (C1): fall back to bare command du when disabled. # Opinionated guard (C1): fall back to bare command du when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command du $argv command du $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 03-editors-and-viewers # 03-editors-and-viewers
# #
# COMPONENT
# aliases/dev-tools
#
# SYNOPSIS # SYNOPSIS
# edit [-V|-t] [-e EDITOR] [-c] [-x TEXT] [-n] [-v|-s] [FILE...] # edit [-V|-t] [-e EDITOR] [-c] [-x TEXT] [-n] [-v|-s] [FILE...]
# #
@@ -50,7 +53,7 @@ function edit --description 'Open files in a terminal or GUI editor with fallbac
set -l c_reset (set_color normal) set -l c_reset (set_color normal)
# Opinionated guard (C1): fall back to the legacy bare-editor behavior. # Opinionated guard (C1): fall back to the legacy bare-editor behavior.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
if set -q EDITOR; and test -n "$EDITOR" if set -q EDITOR; and test -n "$EDITOR"
$EDITOR $argv $EDITOR $argv
else if type -q nvim else if type -q nvim
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 03-editors-and-viewers # 03-editors-and-viewers
# #
# COMPONENT
# aliases/shell-tools
#
# SYNOPSIS # SYNOPSIS
# less [args...] # less [args...]
# #
@@ -18,7 +21,7 @@
# less /var/log/syslog # less /var/log/syslog
function less --wraps='ov' --description 'Pager wrapper: $PAGER → ov → less → more → cat' function less --wraps='ov' --description 'Pager wrapper: $PAGER → ov → less → more → cat'
# Opinionated guard (C1): fall back to bare command less when disabled. # Opinionated guard (C1): fall back to bare command less when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command less $argv command less $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 01-file-and-directory # 01-file-and-directory
# #
# COMPONENT
# aliases/filesystem
#
# SYNOPSIS # SYNOPSIS
# ls [args...] # ls [args...]
# #
@@ -20,7 +23,7 @@
# ls -a ~/projects # ls -a ~/projects
function ls --description 'List all files' function ls --description 'List all files'
# Opinionated guard (C1): fall back to bare command ls when disabled. # Opinionated guard (C1): fall back to bare command ls when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command ls $argv command ls $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 01-file-and-directory # 01-file-and-directory
# #
# COMPONENT
# aliases/filesystem
#
# SYNOPSIS # SYNOPSIS
# mkdir [args...] # mkdir [args...]
# #
@@ -20,7 +23,7 @@
# mkdir ~/projects/myapp/src # mkdir ~/projects/myapp/src
function mkdir --description 'Execute mkdir' function mkdir --description 'Execute mkdir'
# Opinionated guard (C1): fall back to bare command mkdir when disabled. # Opinionated guard (C1): fall back to bare command mkdir when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command mkdir $argv command mkdir $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 01-file-and-directory # 01-file-and-directory
# #
# COMPONENT
# aliases/filesystem
#
# SYNOPSIS # SYNOPSIS
# mv [args...] # mv [args...]
# #
@@ -27,7 +30,7 @@
# mv ~/.config/btop/themes/themes ~/.config/btop/themes # mv ~/.config/btop/themes/themes ~/.config/btop/themes
function mv --wraps='mv' --description 'Move files with auto-collapse for nested directories' function mv --wraps='mv' --description 'Move files with auto-collapse for nested directories'
# Opinionated guard (C1): fall back to bare command mv when disabled. # Opinionated guard (C1): fall back to bare command mv when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command mv $argv command mv $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 10-network # 10-network
# #
# COMPONENT
# aliases/network
#
# SYNOPSIS # SYNOPSIS
# ping [args...] # ping [args...]
# #
@@ -21,7 +24,7 @@
# ping --legend google.com # ping --legend google.com
function ping --description 'prettyping with default nolegend' function ping --description 'prettyping with default nolegend'
# Opinionated guard (C1): fall back to bare command ping when disabled. # Opinionated guard (C1): fall back to bare command ping when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command ping $argv command ping $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 01-file-and-directory # 01-file-and-directory
# #
# COMPONENT
# aliases/search
#
# SYNOPSIS # SYNOPSIS
# rg [args...] # rg [args...]
# #
@@ -21,7 +24,7 @@
# rg -l "TODO" ~/projects/myapp # rg -l "TODO" ~/projects/myapp
function rg --description 'alias rg=rg --hyperlink-format=kitty' function rg --description 'alias rg=rg --hyperlink-format=kitty'
# Opinionated guard (C1): fall back to bare command rg when disabled. # Opinionated guard (C1): fall back to bare command rg when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command rg $argv command rg $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 01-file-and-directory # 01-file-and-directory
# #
# COMPONENT
# aliases/filesystem
#
# SYNOPSIS # SYNOPSIS
# rm [-e [options] | -S | args...] # rm [-e [options] | -S | args...]
# #
@@ -38,7 +41,7 @@
# Falls back to /usr/bin/rm when trash is unavailable. # Falls back to /usr/bin/rm when trash is unavailable.
function rm --description 'Ultimate rm: trash, list, empty, and secure-erase' function rm --description 'Ultimate rm: trash, list, empty, and secure-erase'
# Opinionated guard (C1): fall back to bare command rm when disabled. # Opinionated guard (C1): fall back to bare command rm when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command rm $argv command rm $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 08-terminal-management # 08-terminal-management
# #
# COMPONENT
# aliases/network
#
# SYNOPSIS # SYNOPSIS
# ssh [args...] # ssh [args...]
# #
@@ -20,7 +23,7 @@
# ssh user@host # ssh user@host
function ssh --description 'Alias ssh to kitten ssh when using Kitty terminal' function ssh --description 'Alias ssh to kitten ssh when using Kitty terminal'
# Opinionated guard (C1): fall back to bare command ssh when disabled. # Opinionated guard (C1): fall back to bare command ssh when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command ssh $argv command ssh $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 07-system-and-monitoring # 07-system-and-monitoring
# #
# COMPONENT
# aliases/monitor
#
# SYNOPSIS # SYNOPSIS
# top [args...] # top [args...]
# #
@@ -18,7 +21,7 @@
# top # top
function top --wraps='btop' --description 'Use btop as a modern replacement for top' function top --wraps='btop' --description 'Use btop as a modern replacement for top'
# Opinionated guard (C1): fall back to bare command top when disabled. # Opinionated guard (C1): fall back to bare command top when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command top $argv command top $argv
return $status return $status
end end
+4 -1
View File
@@ -4,6 +4,9 @@
# CATEGORY # CATEGORY
# 13-media-and-utilities # 13-media-and-utilities
# #
# COMPONENT
# aliases/network
#
# SYNOPSIS # SYNOPSIS
# yt-dlp [args...] URL [URL...] # yt-dlp [args...] URL [URL...]
# #
@@ -29,7 +32,7 @@
# yt-dlp --no-embed-thumbnail dQw4w9WgXcQ # drops our thumbnail default # yt-dlp --no-embed-thumbnail dQw4w9WgXcQ # drops our thumbnail default
function yt-dlp --description 'yt-dlp with embedding + SponsorBlock defaults' function yt-dlp --description 'yt-dlp with embedding + SponsorBlock defaults'
# Opinionated guard (C1): fall back to bare command yt-dlp when disabled. # Opinionated guard (C1): fall back to bare command yt-dlp when disabled.
if not __fish_config_op_enabled __fish_config_op_aliases if not __fish_config_op_enabled (status current-function)
command yt-dlp $argv command yt-dlp $argv
return $status return $status
end end