refactor(config): migrate multi-category files and config.fish to named sites

Adds multi-site `# COMPONENT` headers and converts every guard call site in
conf.d/tricks.fish, conf.d/abbr.fish, functions/smart_exit.fish,
conf.d/yay-wrapper.fish, conf.d/paru-wrapper.fish, conf.d/wakatime.fish,
conf.d/first_run.fish, and config.fish (9 sites across 3 categories) to the
self-identifying `(status current-function|basename) <site>` calling
convention. Regenerates conf.d/__fish_config_op_registry.fish.
This commit is contained in:
2026-08-18 02:39:47 -04:00
parent c3a2e35465
commit 6b2d3bf491
9 changed files with 111 additions and 26 deletions
+6 -2
View File
@@ -4,6 +4,10 @@
# CATEGORY
# 11-pager-and-logging
#
# COMPONENT
# site exit-plain: overrides/key-bindings
# site logging-guard: logging/terminal-capture
#
# SYNOPSIS
# smart_exit [-h] [-n]
#
@@ -32,7 +36,7 @@ function smart_exit --description 'Capture colorized scrollback before exiting,
# Opinionated guard (C3): exit plainly when overrides are disabled.
# This composes with Task #4's __fish_config_enable_logging, which will
# gate only the scrollback capture while leaving the exit wrapper active.
if not __fish_config_op_enabled __fish_config_op_overrides
if not __fish_config_op_enabled (status current-function) exit-plain
builtin exit $argv
end
@@ -60,7 +64,7 @@ function smart_exit --description 'Capture colorized scrollback before exiting,
# C5 — Logging & Capture: skip all capture when logging is disabled.
# When disabled, tell Kitty the window is handled so its watcher doesn't
# capture either — belt-and-suspenders alongside the sentinel file.
if not __fish_config_op_enabled __fish_config_op_logging
if not __fish_config_op_enabled (status current-function) logging-guard
if test -n "$KITTY_WINDOW_ID"
kitty @ set-user-vars "logged_by_shell=true" 2>/dev/null
end