Replace 'if (command -v x &>/dev/null); then' with
'if command -v x &>/dev/null; then' across completion.d, rc.d and
profile.d. Parentheses forced a subshell fork for every 'if' check,
which is unnecessary overhead since command -v runs fine in the
current shell.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.