From 516b2ba26c25f2bcf5f5059e5b6f29fd490cb0d4 Mon Sep 17 00:00:00 2001 From: Rootiest Date: Mon, 17 Aug 2026 21:49:45 -0400 Subject: [PATCH] refactor(config): migrate C4 integrations call sites to self-identifying guard --- conf.d/__fish_config_op_registry.fish | 14 ++++++++++++++ conf.d/done.fish | 5 ++++- functions/hist.fish | 5 ++++- functions/logs.fish | 5 ++++- functions/split.fish | 5 ++++- functions/spwin.fish | 5 ++++- functions/tab.fish | 5 ++++- functions/upgrade.fish | 5 ++++- 8 files changed, 42 insertions(+), 7 deletions(-) diff --git a/conf.d/__fish_config_op_registry.fish b/conf.d/__fish_config_op_registry.fish index d2b3f98..b9cd5d7 100644 --- a/conf.d/__fish_config_op_registry.fish +++ b/conf.d/__fish_config_op_registry.fish @@ -16,12 +16,15 @@ set -g __fish_config_op_registry_keys \ bash_expands: \ cat: \ claude: \ + done: \ du: \ edit: \ fish_right_prompt: \ help: \ + hist: \ key_bindings: \ less: \ + logs: \ ls: \ mkdir: \ mv: \ @@ -29,10 +32,14 @@ set -g __fish_config_op_registry_keys \ puffer: \ rg: \ rm: \ + split: \ + spwin: \ ssh: \ starship: \ + tab: \ theme: \ top: \ + upgrade: \ yt-dlp: \ zoxide: @@ -46,12 +53,15 @@ set -g __fish_config_op_registry_values \ "overrides/key-bindings" \ "aliases/filesystem" \ "aliases/dev-tools" \ + "integrations/notifications" \ "aliases/filesystem" \ "aliases/dev-tools" \ "overrides/prompt" \ "aliases/shell-tools" \ + "integrations/history-logs" \ "overrides/key-bindings" \ "aliases/shell-tools" \ + "integrations/history-logs" \ "aliases/filesystem" \ "aliases/filesystem" \ "aliases/filesystem" \ @@ -59,10 +69,14 @@ set -g __fish_config_op_registry_values \ "overrides/key-bindings" \ "aliases/search" \ "aliases/filesystem" \ + "integrations/window-mgmt" \ + "integrations/window-mgmt" \ "aliases/network" \ "overrides/prompt" \ + "integrations/window-mgmt" \ "overrides/prompt" \ "aliases/monitor" \ + "integrations/pkg-upgrade" \ "aliases/network" \ "aliases/filesystem" diff --git a/conf.d/done.fish b/conf.d/done.fish index bb108d0..95a0e3b 100644 --- a/conf.d/done.fish +++ b/conf.d/done.fish @@ -19,6 +19,9 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +# +# COMPONENT +# integrations/notifications if not status is-interactive exit @@ -26,7 +29,7 @@ end # Local modification: opinionated guard (AGENTS.md Task #3). Desktop # notifications assume a graphical session, classified as C4 integrations. -__fish_config_op_enabled __fish_config_op_integrations; or exit +__fish_config_op_enabled (status basename); or exit set -g __done_version 1.19.1 diff --git a/functions/hist.fish b/functions/hist.fish index 9fd2b06..b21c97c 100644 --- a/functions/hist.fish +++ b/functions/hist.fish @@ -4,6 +4,9 @@ # CATEGORY # 04-git-and-version-control # +# COMPONENT +# integrations/history-logs +# # SYNOPSIS # hist # @@ -15,7 +18,7 @@ # hist function hist --description 'Search fish history and put it in the prompt' # Opinionated guard (C4): integrations disabled - if not __fish_config_op_enabled __fish_config_op_integrations + if not __fish_config_op_enabled (status current-function) set -l c_err (set_color red) set -l c_reset (set_color normal) echo "$c_err"'hist: disabled by __fish_config_op_integrations'"$c_reset" >&2 diff --git a/functions/logs.fish b/functions/logs.fish index 3474ed1..fe64d17 100644 --- a/functions/logs.fish +++ b/functions/logs.fish @@ -4,6 +4,9 @@ # CATEGORY # 11-pager-and-logging # +# COMPONENT +# integrations/history-logs +# # SYNOPSIS # logs [-h] [-c ] # @@ -35,7 +38,7 @@ # logs -c scrollback function logs --description 'Browse terminal log files interactively with fzf' # Opinionated guard (C4): integrations disabled - if not __fish_config_op_enabled __fish_config_op_integrations + if not __fish_config_op_enabled (status current-function) set -l c_err (set_color red) set -l c_reset (set_color normal) echo "$c_err"'logs: disabled by __fish_config_op_integrations'"$c_reset" >&2 diff --git a/functions/split.fish b/functions/split.fish index 9317d8a..618b42a 100644 --- a/functions/split.fish +++ b/functions/split.fish @@ -4,6 +4,9 @@ # CATEGORY # 08-terminal-management # +# COMPONENT +# integrations/window-mgmt +# # SYNOPSIS # split [-h | -v] [command...] # @@ -27,7 +30,7 @@ # split -v nvim README.md function split --description 'Run a command in a new terminal split' # Opinionated guard (C4): integrations disabled - if not __fish_config_op_enabled __fish_config_op_integrations + if not __fish_config_op_enabled (status current-function) set -l c_err (set_color red) set -l c_reset (set_color normal) echo "$c_err"'split: disabled by __fish_config_op_integrations'"$c_reset" >&2 diff --git a/functions/spwin.fish b/functions/spwin.fish index 54bbd04..18fb036 100644 --- a/functions/spwin.fish +++ b/functions/spwin.fish @@ -4,6 +4,9 @@ # CATEGORY # 08-terminal-management # +# COMPONENT +# integrations/window-mgmt +# # SYNOPSIS # spwin [args...] # @@ -22,7 +25,7 @@ # spwin function spwin --wraps='~/.config/kitty/spawn-window.sh' --description 'spawn window in kitty or wezterm' # Opinionated guard (C4): integrations disabled - if not __fish_config_op_enabled __fish_config_op_integrations + if not __fish_config_op_enabled (status current-function) set -l c_err (set_color red) set -l c_reset (set_color normal) echo "$c_err"'spwin: disabled by __fish_config_op_integrations'"$c_reset" >&2 diff --git a/functions/tab.fish b/functions/tab.fish index 9b77440..6cb9c21 100644 --- a/functions/tab.fish +++ b/functions/tab.fish @@ -4,6 +4,9 @@ # CATEGORY # 08-terminal-management # +# COMPONENT +# integrations/window-mgmt +# # SYNOPSIS # tab [args...] # @@ -23,7 +26,7 @@ # tab function tab --description 'Spawn a new tab in the current terminal' # Opinionated guard (C4): integrations disabled - if not __fish_config_op_enabled __fish_config_op_integrations + if not __fish_config_op_enabled (status current-function) set -l c_err (set_color red) set -l c_reset (set_color normal) echo "$c_err"'tab: disabled by __fish_config_op_integrations'"$c_reset" >&2 diff --git a/functions/upgrade.fish b/functions/upgrade.fish index 296f56d..68702bb 100644 --- a/functions/upgrade.fish +++ b/functions/upgrade.fish @@ -4,6 +4,9 @@ # CATEGORY # 05-package-management # +# COMPONENT +# integrations/pkg-upgrade +# # SYNOPSIS # upgrade # @@ -19,7 +22,7 @@ # upgrade function upgrade --description 'Full system upgrade via paru or yay' # Opinionated guard (C4): integrations disabled - if not __fish_config_op_enabled __fish_config_op_integrations + if not __fish_config_op_enabled (status current-function) set -l c_err (set_color red) set -l c_reset (set_color normal) echo "$c_err"'upgrade: disabled by __fish_config_op_integrations'"$c_reset" >&2