rc: Use POSIX command -v instead of which

This commit is contained in:
Frank LENORMAND 2017-05-16 15:18:45 +03:00
parent d5726c0cfd
commit 56837eaece

View File

@ -11,7 +11,7 @@ decl str termcmd %sh{
'gnome-terminal -e ' \
'xfce4-terminal -e ' ; do
terminal=${termcmd%% *}
if which $terminal > /dev/null 2>&1; then
if command -v $terminal >/dev/null 2>&1; then
printf %s\\n "'$termcmd'"
exit
fi