testsAndMisc/linux_configuration/zsh
Krzysztof kuhy Rudnicki 1506371976 Split calc-live.zsh: extract the qalc coprocess
266 -> 204, with the warmed qalc coprocess (its four _CALC_Q* state vars
and four functions) in calc-live-qalc.zsh at 74.

The source line uses ${0:A:h}, matching what the file already does for
_CALC_EVAL_PY. That is load-bearing here: this file is loaded as
~/.oh-my-zsh/custom/calc-live.zsh, a symlink into the repo, so a naive
$0 would look for the sibling in the oh-my-zsh custom dir, where it does
not exist -- and break every new shell, not just one script run.

So it is verified THROUGH the symlink, not the repo path: sources clean,
functions defined across the seam, and the qalc path in the new file
answers end to end ("=5 ft to cm" -> 152.4 cm). Seven expressions give
byte-identical results to HEAD, and _calc_is_expr still accepts "2+2"
while rejecting "ls -la".

zsh -n is the parse check here; shellcheck cannot read zsh and the
repo's hook excludes it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-16 22:12:32 +02:00
..
scratchpad refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
calc-live-qalc.zsh Split calc-live.zsh: extract the qalc coprocess 2026-08-16 22:12:32 +02:00
calc-live.zsh Split calc-live.zsh: extract the qalc coprocess 2026-08-16 22:12:32 +02:00
calc-popup.sh refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
claude-tty-fix.zsh claude-tty-fix.zsh: precmd mouse-heal, debug logging, on-demand MCP launchers 2026-07-18 15:55:28 +02:00
token-savers.zsh session_autopsy: badge counts only significant candidates; zero-token aliases 2026-07-25 18:05:49 +02:00