Audits every function's interaction with the C1-shadowed commands (uses-shadow/bypasses-shadow) and general hazards (destructive, network, blocking-prompt) per the CLASSIFICATION schema. Delegated the initial mechanical sweep to agy, then reviewed every file by hand: fixed a systemic double-blank-comment-line formatting bug from the delegate pass, and corrected several judgment errors found on review -- three false blocking-prompt tags where a fish 'read' was consuming piped input rather than waiting on a terminal (open-url.fish, sbver.fish, play-media.fish, now untagged entirely), a blocking-prompt tag on mkrep.fish despite its documented --yes escape hatch, an untagged read in jobrunner.fish's own baseless blocking-prompt claim (removed, along with a destructive tag on cleanup of its own mktemp output -- the schema explicitly excludes that), the same own-output-cleanup false positive on _zellij_dump_log.fish's destructive tag, an interactive fzf-gated confirmation on logs.fish and replay.fish's piped read misread the same way as the first three, and a uses-shadow(mkdir) on mkcd.fish that actually belongs to the _fish_mkdir_p helper it delegates to, not to mkcd itself.
26 lines
842 B
Fish
26 lines
842 B
Fish
# Copyright (C) 2026 Rootiest
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
# CLASSIFICATION
|
|
# bypasses-shadow(grep)
|
|
#
|
|
# SYNOPSIS
|
|
# __kitty_logging_has_watcher
|
|
#
|
|
# DESCRIPTION
|
|
# Succeeds (returns 0) when the top-level kitty.conf contains an active
|
|
# (non-commented) watcher directive — whether the fish-config managed one or
|
|
# a user's own. Used to suppress the setup reminder and to inform status.
|
|
#
|
|
# EXIT STATUS
|
|
# 0 An active watcher directive is present
|
|
# 1 None present, or kitty.conf does not exist
|
|
#
|
|
# EXAMPLE
|
|
# __kitty_logging_has_watcher; and echo "already wired"
|
|
function __kitty_logging_has_watcher --description 'True if kitty.conf has an active watcher directive'
|
|
set -l conf (__kitty_logging_dir)/kitty.conf
|
|
test -f $conf; or return 1
|
|
command grep -qE '^[[:space:]]*watcher[[:space:]]' $conf
|
|
end
|