refactor(functions): consolidate 198 duplicate color declarations into one helper #131

Merged
rootiest merged 11 commits from refactor/shared-color-palette into main 2026-09-08 05:44:17 +00:00
Showing only changes of commit bca79d3c5a - Show all commits
+5
View File
@@ -116,6 +116,11 @@ if test $mode = structural
for f in (git -C $repo diff --name-only $baseline -- functions/) for f in (git -C $repo diff --name-only $baseline -- functions/)
# fish_prompt.fish keeps its own hex palette -- see Task 10. # fish_prompt.fish keeps its own hex palette -- see Task 10.
string match -q '*fish_prompt.fish' $f; and continue string match -q '*fish_prompt.fish' $f; and continue
# __fish_palette.fish is the palette itself: a new file, so its diff
# is 100% additions and can never be "purely structural". Skipping it
# is not a loosening -- it declares the colours rather than rendering
# any, and tests/functional.fish asserts its 12 roles directly.
string match -q '*__fish_palette.fish' $f; and continue
set -l offenders set -l offenders
for line in (git -C $repo diff -U0 $baseline -- $f | string match -r '^[+-][^+-].*') for line in (git -C $repo diff -U0 $baseline -- $f | string match -r '^[+-][^+-].*')
set -l body (string sub -s 2 -- $line) set -l body (string sub -s 2 -- $line)