fix: suppress fish shadow warning corrupting config-toggle redraw

When a category variable is set explicitly in both universal and session
scope, interactive fish prints a one-line stderr warning ("successfully set
universal 'X'; but a global by that name shadows it") on each `set -U`/`set
-g`. That stray line landed between the apply and the in-place panel redraw,
pushing the cursor down one row so the `\e[14A` cursor-up no longer reached
the top border — leaving it behind to stack on every toggle and persist
after exit.

Suppress stderr on the six set commands in __config_toggle_apply. The
warning is expected noise here since config-toggle edits both scopes
independently. The warning only fires in a real interactive TTY (not under
`fish -ic`), which is why it was easy to miss when testing.
This commit is contained in:
2026-06-12 17:40:18 -04:00
parent b323fedf49
commit 4210f3b445
2 changed files with 16 additions and 6 deletions
+1
View File
@@ -149,5 +149,6 @@ function config-toggle --description 'Interactive TUI for toggling opinionated c
# ── Cleanup ───────────────────────────────────────────
trap - INT # remove the signal handler
printf '\e[%dA\e[J' $panel_h # erase the panel
printf '\e[?25h' # restore cursor
end