refactor(config): migrate C1 aliases call sites to self-identifying guard
This commit is contained in:
@@ -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
@@ -5,6 +5,9 @@
|
||||
# │ help config wrapper │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/shell-tools
|
||||
#
|
||||
# SYNOPSIS
|
||||
# help [topic] [sub-topic...]
|
||||
# help config [section] [-w|--html] [-m|--man] [-h|--help]
|
||||
@@ -50,7 +53,7 @@ end
|
||||
# --- Wrapper Definition ---
|
||||
function help --wraps help --description "Custom wrapper to intercept 'help config'"
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -3,6 +3,9 @@
|
||||
# Adapted from icezyclon/zoxide.fish (MIT)
|
||||
# Heavily customized for Fish 4.x compatibility and performance
|
||||
|
||||
# COMPONENT
|
||||
# aliases/filesystem
|
||||
|
||||
if status is-interactive
|
||||
|
||||
if type -q zoxide
|
||||
@@ -65,7 +68,7 @@ if status is-interactive
|
||||
|
||||
# Shadowing cd with zoxide is opinionated (C1 aliasing); z and zi
|
||||
# remain available either way.
|
||||
if __fish_config_op_enabled __fish_config_op_aliases
|
||||
if __fish_config_op_enabled (status basename)
|
||||
alias cd=z
|
||||
end
|
||||
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 12-ai-and-developer-tools
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/dev-tools
|
||||
#
|
||||
# DEPENDENCIES
|
||||
# agents-init
|
||||
#
|
||||
@@ -35,7 +38,7 @@
|
||||
# agy -i "initial prompt"
|
||||
# agy models
|
||||
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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 14-miscellaneous
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/shell-tools
|
||||
#
|
||||
# SYNOPSIS
|
||||
# bash [args...]
|
||||
#
|
||||
@@ -18,7 +21,7 @@
|
||||
# bash
|
||||
function bash --wraps='bash' --description 'bash switches to bash shell'
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 01-file-and-directory
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/filesystem
|
||||
#
|
||||
# SYNOPSIS
|
||||
# cat [args...]
|
||||
#
|
||||
@@ -21,7 +24,7 @@
|
||||
# cat ~/projects/myapp
|
||||
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.
|
||||
if not __fish_config_op_enabled __fish_config_op_aliases
|
||||
if not __fish_config_op_enabled (status current-function)
|
||||
command cat $argv
|
||||
return $status
|
||||
end
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 12-ai-and-developer-tools
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/dev-tools
|
||||
#
|
||||
# DEPENDENCIES
|
||||
# agents-init
|
||||
#
|
||||
@@ -33,7 +36,7 @@
|
||||
# claude --resume
|
||||
# claude "Explain the recent changes"
|
||||
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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 01-file-and-directory
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/filesystem
|
||||
#
|
||||
# SYNOPSIS
|
||||
# du [--disk|--dir|--dua] [args...]
|
||||
#
|
||||
@@ -23,7 +26,7 @@
|
||||
# du --disk
|
||||
function du --description 'Execute du'
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 03-editors-and-viewers
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/dev-tools
|
||||
#
|
||||
# SYNOPSIS
|
||||
# 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)
|
||||
|
||||
# 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"
|
||||
$EDITOR $argv
|
||||
else if type -q nvim
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 03-editors-and-viewers
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/shell-tools
|
||||
#
|
||||
# SYNOPSIS
|
||||
# less [args...]
|
||||
#
|
||||
@@ -18,7 +21,7 @@
|
||||
# less /var/log/syslog
|
||||
function less --wraps='ov' --description 'Pager wrapper: $PAGER → ov → less → more → cat'
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 01-file-and-directory
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/filesystem
|
||||
#
|
||||
# SYNOPSIS
|
||||
# ls [args...]
|
||||
#
|
||||
@@ -20,7 +23,7 @@
|
||||
# ls -a ~/projects
|
||||
function ls --description 'List all files'
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 01-file-and-directory
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/filesystem
|
||||
#
|
||||
# SYNOPSIS
|
||||
# mkdir [args...]
|
||||
#
|
||||
@@ -20,7 +23,7 @@
|
||||
# mkdir ~/projects/myapp/src
|
||||
function mkdir --description 'Execute mkdir'
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 01-file-and-directory
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/filesystem
|
||||
#
|
||||
# SYNOPSIS
|
||||
# mv [args...]
|
||||
#
|
||||
@@ -27,7 +30,7 @@
|
||||
# mv ~/.config/btop/themes/themes ~/.config/btop/themes
|
||||
function mv --wraps='mv' --description 'Move files with auto-collapse for nested directories'
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 10-network
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/network
|
||||
#
|
||||
# SYNOPSIS
|
||||
# ping [args...]
|
||||
#
|
||||
@@ -21,7 +24,7 @@
|
||||
# ping --legend google.com
|
||||
function ping --description 'prettyping with default nolegend'
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 01-file-and-directory
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/search
|
||||
#
|
||||
# SYNOPSIS
|
||||
# rg [args...]
|
||||
#
|
||||
@@ -21,7 +24,7 @@
|
||||
# rg -l "TODO" ~/projects/myapp
|
||||
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
|
||||
if not __fish_config_op_enabled (status current-function)
|
||||
command rg $argv
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 01-file-and-directory
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/filesystem
|
||||
#
|
||||
# SYNOPSIS
|
||||
# rm [-e [options] | -S | args...]
|
||||
#
|
||||
@@ -38,7 +41,7 @@
|
||||
# Falls back to /usr/bin/rm when trash is unavailable.
|
||||
function rm --description 'Ultimate rm: trash, list, empty, and secure-erase'
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 08-terminal-management
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/network
|
||||
#
|
||||
# SYNOPSIS
|
||||
# ssh [args...]
|
||||
#
|
||||
@@ -20,7 +23,7 @@
|
||||
# ssh user@host
|
||||
function ssh --description 'Alias ssh to kitten ssh when using Kitty terminal'
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
+4
-1
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 07-system-and-monitoring
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/monitor
|
||||
#
|
||||
# SYNOPSIS
|
||||
# top [args...]
|
||||
#
|
||||
@@ -18,7 +21,7 @@
|
||||
# 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.
|
||||
if not __fish_config_op_enabled __fish_config_op_aliases
|
||||
if not __fish_config_op_enabled (status current-function)
|
||||
command top $argv
|
||||
return $status
|
||||
end
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# CATEGORY
|
||||
# 13-media-and-utilities
|
||||
#
|
||||
# COMPONENT
|
||||
# aliases/network
|
||||
#
|
||||
# SYNOPSIS
|
||||
# yt-dlp [args...] URL [URL...]
|
||||
#
|
||||
@@ -29,7 +32,7 @@
|
||||
# yt-dlp --no-embed-thumbnail dQw4w9WgXcQ # drops our thumbnail default
|
||||
function yt-dlp --description 'yt-dlp with embedding + SponsorBlock defaults'
|
||||
# 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
|
||||
return $status
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user