From 6f5c4a4487c647434bee9a7e049bd085789ba2a8 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 02 Jul 2018 16:07:30 -0400 Subject: is_cmd(): Replace pipeline and external commands with case --- diff --git a/src/cmd.sh b/src/cmd.sh index e50b870..ac84f16 100644 --- a/src/cmd.sh +++ b/src/cmd.sh @@ -99,7 +99,7 @@ is_cmd() { local cmd="${1}" - [ "x$(printf '%s\n' ${cmds} | grep "^${cmd}$")" = "x${cmd}" ] + case "${cmds}" in *" ${cmd} "*) return 0;; *) return 1;; esac return ${?} } -- cgit v0.9.1