__fish_config_sync_logging carried its own inferior copy of the paru/yay wrapper generator (tee-based, no PTY, no progress-bar rendering, hard-coded /usr/bin/paru|yay) alongside the canonical version-6 generators in conf.d/paru-wrapper.fish and conf.d/yay-wrapper.fish. Both wrote the same file with different version markers and the same misattributed provenance comment, so whichever ran last won and a subsequent C5 toggle would flip it back. See startup-latency-JOB-BRIEF-FINDINGS.md §2. __fish_config_sync_logging now delegates entirely to the canonical generators instead of carrying a copy: they already resolve the real binary via __fish_real_command (never /usr/bin-assumed) and independently gate on their own C2/C5 keys, covering both the enabled-regenerate and disabled-remove cases. One behavior change falls out of delegating rather than special-casing around it: a wrapper is no longer generated when C2 (paru-autoexec / yay-autoexec) is disabled, even if C5 logging is on. The removed sync-logging copy never checked C2, so it could reinstall a wrapper the user had explicitly turned auto-exec off for. Adds functions/_fish_source_scoped.fish: a small helper that runs source inside its own function-call boundary. source itself runs in the caller's scope, so a bare return inside a sourced conf.d guard (both files have several) would otherwise unwind whatever function called source directly -- verified with a minimal repro before relying on it. Routing through this helper contains the return to just that call, so calling paru's generator and then yay's actually reaches the second call. Manually verified end-to-end in an isolated HOME/XDG sandbox with a stubbed paru/yay: enable generates both v6 wrappers, disable removes both and drops the sentinel, re-enable regenerates them and clears the sentinel.
27 lines
828 B
Fish
27 lines
828 B
Fish
# Copyright (C) 2026 Rootiest
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
# SYNOPSIS
|
|
# _fish_source_scoped <file>
|
|
#
|
|
# DESCRIPTION
|
|
# Sources <file> inside its own function-call boundary. `source` runs
|
|
# in the caller's own scope, so a bare `return` in a sourced file --
|
|
# used by several conf.d guards as an early exit -- would otherwise
|
|
# unwind whatever function called `source` directly, not just the
|
|
# sourced file. Calling through this helper contains it to here.
|
|
#
|
|
# ARGUMENTS
|
|
# file Path to the fish script to source
|
|
#
|
|
# EXIT STATUS
|
|
# 0 File does not exist (nothing to do)
|
|
# Exit status of the sourced file otherwise
|
|
#
|
|
# EXAMPLE
|
|
# _fish_source_scoped $__fish_config_dir/conf.d/paru-wrapper.fish
|
|
function _fish_source_scoped --argument-names file
|
|
test -f $file; or return 0
|
|
source $file
|
|
end
|