refactor(config): migrate C5 logging call sites to self-identifying guard

This commit is contained in:
2026-08-18 02:22:31 -04:00
parent e02919de21
commit c3a2e35465
6 changed files with 33 additions and 6 deletions
+4 -1
View File
@@ -1,6 +1,9 @@
# Copyright (C) 2026 Rootiest
# SPDX-License-Identifier: AGPL-3.0-or-later
# COMPONENT
# logging/terminal-capture
#
# SYNOPSIS
# __fish_config_sync_logging
#
@@ -29,7 +32,7 @@ function __fish_config_sync_logging --description 'Sync C5 logging state: sentin
set -l yay_wrapper "$HOME/.local/bin/yay"
set -l wrapper_version 1
if __fish_config_op_enabled __fish_config_op_logging
if __fish_config_op_enabled (status current-function)
# Logging enabled: remove sentinel and regenerate wrappers if binaries exist
rm -f $sentinel
+4 -1
View File
@@ -1,6 +1,9 @@
# Copyright (C) 2026 Rootiest
# SPDX-License-Identifier: AGPL-3.0-or-later
# COMPONENT
# logging/multiplexer-capture
#
# SYNOPSIS
# _zellij_dump_log
#
@@ -23,7 +26,7 @@
# EXAMPLE
# _zellij_dump_log
function _zellij_dump_log --description 'Dump the current Zellij pane scrollback to a log file, with pruning'
__fish_config_op_enabled __fish_config_op_logging; or return 0
__fish_config_op_enabled (status current-function); or return 0
set -q ZELLIJ; or return 0
type -q zellij; or return 0
+5 -2
View File
@@ -4,6 +4,9 @@
# CATEGORY
# 14-miscellaneous
#
# COMPONENT
# logging/terminal-capture
#
# SYNOPSIS
# kitty-logging [install | uninstall | status | dismiss] [-h]
#
@@ -97,7 +100,7 @@ function kitty-logging --description 'Install/manage the fish-config Kitty scrol
else
echo " Watcher file: $c_warn""not installed$c_reset"
end
if __fish_config_op_enabled __fish_config_op_logging
if __fish_config_op_enabled (status current-function)
echo " C5 logging: $c_ok""enabled$c_reset"
else
echo " C5 logging: $c_warn""disabled$c_reset (capture is currently inert)"
@@ -143,7 +146,7 @@ function kitty-logging --description 'Install/manage the fish-config Kitty scrol
end
echo "$c_ok""→ Installed.$c_reset Watcher wired into $conf"
echo " $c_dim""Restart Kitty (new windows) for it to take effect.$c_reset"
if not __fish_config_op_enabled __fish_config_op_logging
if not __fish_config_op_enabled (status current-function)
echo " $c_warn""Note: C5 logging is disabled, so capture is currently inert.$c_reset"
end
return 0