style: Use command -v instead of which for availability checks

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.
This commit is contained in:
xavier committed 2026-08-22 00:55:55 +02:00
1 parent df189f9ec1
commit 55d2607035
4 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -2,6 +2,6 @@
# git clone https://github.com/riywo/anyenv ${HOME}/.anyenv
if (which anyenv &>/dev/null); then
if (command -v anyenv &>/dev/null); then
eval "$(anyenv init -)"
fi