From: Mark Wooding Date: Thu, 11 Jul 2024 11:22:27 +0000 (+0100) Subject: dot/profile (__mdw_programp): Use `command -v' rather than `type'. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/3cff872ac483929fd76e951b05323d8a6fd22e7f?ds=inline dot/profile (__mdw_programp): Use `command -v' rather than `type'. POSIX specifies the exit status for the former but not the latter. --- diff --git a/dot/profile b/dot/profile index f8d4dc9..ad6deeb 100644 --- a/dot/profile +++ b/dot/profile @@ -44,7 +44,7 @@ __mdw_addto () { ## __mdw_programp NAME ## ## Does NAME exist as an executable program? -__mdw_programp () { type >/dev/null 2>&1 "$1"; } +__mdw_programp () { command -v "$1" >/dev/null 2>&1; } ## __mdw_setconf VAR CONF [DEFAULT] ##