summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2018-07-02 16:07:30 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2018-07-02 16:07:30 (EDT)
commit6f5c4a4487c647434bee9a7e049bd085789ba2a8 (patch)
treeb45541b46a88bbb7aeb77a1deb510065b21fefbd
parent0dc8e90ca587f39b9c9a2720ae4550854a5c83e4 (diff)
is_cmd(): Replace pipeline and external commands with case
-rw-r--r--src/cmd.sh2
1 files changed, 1 insertions, 1 deletions
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 ${?}
}