Replace ad-hoc conditional blocks with helper functions and arrays for PATH
extensions, sourced files, shell options, and a new eval_expressions array
that evals tool initializer output (starting with pyenv init -).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>