refactor: retire drifted palette names in the last five functions

c_rst/c_txt -> c_reset, c_ttl -> c_head, c_bold -> c_cmd, c_primary -> c_arg
across 67 interpolation sites (c_rst 53, c_primary 10, c_bold 2, c_ttl 1,
c_txt 1). Each maps to a variable holding identical bytes, so output is
unchanged. Unlike the 33 structural conversions this edits text that
renders, so it is gated on its own per-file byte-diff against main:

  ok  logs --help         (431 B out, 0 B err)
  ok  mkcd --help         (437 B out, 0 B err)
  ok  qc --help           (936 B out, 0 B err)
  ok  rand_string --help  (883 B out, 0 B err)
  ok  smart_exit --help   (265 B out, 0 B err)
  ok  mkcd                (437 B out, 0 B err)   <- no-args error path

c_accent is deliberately NOT merged into c_ok -- both are (set_color green)
but a role is a semantic slot, not a colour. See JOB-BRIEF-FINDINGS.md.

logs.fish needed two calls (the C4 guard block and the --help block, both at
8-space indentation); it is the only multi-run file in the repository and the
exact trap a depth-deduplicating converter falls into. logs.fish also declared
c_bold without ever interpolating it -- that declaration is simply deleted.
This commit is contained in:
2026-09-07 20:10:43 -04:00
parent d75bf4f1b4
commit 7d815b17e8
5 changed files with 50 additions and 75 deletions
+5 -9
View File
@@ -44,20 +44,16 @@ function smart_exit --description 'Capture colorized scrollback before exiting,
argparse $options -- $argv
or return 1
set -l c_primary (set_color cyan)
set -l c_accent (set_color green)
set -l c_warn (set_color yellow)
set -l c_bold (set_color --bold)
set -l c_reset (set_color normal)
__fish_palette
if set -q _flag_help
echo -e "Usage: $c_accent"exit"$c_reset [$c_primary""OPTIONS""$c_reset]"
echo -e "Usage: $c_accent"exit"$c_reset [$c_arg""OPTIONS""$c_reset]"
echo ""
echo "Closes the current shell session, automatically archiving the window scrollback."
echo ""
echo "Options:"
echo -e " $c_primary""-h, --help""$c_reset Show this help message"
echo -e " $c_primary""-n, --no-log""$c_reset Exit immediately $c_bold""without""$c_reset saving a scrollback history log"
echo -e " $c_arg""-h, --help""$c_reset Show this help message"
echo -e " $c_arg""-n, --no-log""$c_reset Exit immediately $c_cmd""without""$c_reset saving a scrollback history log"
return 0
end
@@ -112,7 +108,7 @@ function smart_exit --description 'Capture colorized scrollback before exiting,
end
end
else
echo -e "$c_warn""➔""$c_reset Exiting discreetly; $c_bold""no history logs saved.""$c_reset"
echo -e "$c_warn""➔""$c_reset Exiting discreetly; $c_cmd""no history logs saved.""$c_reset"
sleep 0.4
end