_path_add only ever appended to PATH, which didn't fit profile.d/krew
and profile.d/anyenv (they prepend, to take priority). Rename it to
_path_append for clarity and add _path_prepend alongside it, so both
orderings get the same dedup guard when needed — krew and anyenv
aren't converted yet, kept as plain PATH concatenation until then.
profile.d/path and rc.d/rvm concatenated onto PATH directly, so
re-sourcing them in the same shell (source ~/.bashrc, a resourced
tmux pane, etc.) would duplicate entries. _path_add already guards
against that and tests directory existence itself.
profile.d/krew and profile.d/anyenv are left untouched: they prepend
to PATH (to take priority over other entries), while _path_add always
appends — converting them would silently change resolution order.
rc.d/asdf tested native (~/.asdf) and Nix-profile asdf independently,
so if both were present on a machine, asdf would be sourced twice —
duplicate PATH entries and redefined completions/functions. Make the
Nix branch an elif so at most one is sourced.
rc.d/anyenv, rc.d/screen, aliases.d/mc, and rc.d/startx were the last
holdouts still using `which` to check tool availability. Every other
file in rc.d/* already uses `command -v`, which doesn't depend on an
external binary being installed.
Replace bare $var with ${var} everywhere it was still used, matching
the convention already established in rc.d/prompt and rc.d/history.
Positional parameters ($1, $@, $#) and special variables ($?, $$, $-)
are left as-is, consistent with existing usage in _helpers.bash.
rc.d/broot is auto-generated by the broot binary and will likely be
overwritten with its original formatting on the next broot update.
These files are always sourced (never executed directly), so the
#!/bin/bash shebang is inert and misleading. Drop it consistently
across rc.d/*, profile.d/*, and aliases.d/*.
Merge rc.d/mcfly and rc.d/atuin into rc.d/history, following the same
preference-list + availability-check + fallback pattern as rc.d/prompt,
so only one history tool is active at a time instead of both being
initialized independently. Also normalize variable expansions in
rc.d/prompt to consistently use ${var} braces.