Browse Source

refactor: use pattern instead of grep

Kyle P Davis 3 months ago
parent
commit
425d13b086
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gimme

+ 1 - 1
gimme

@@ -23,7 +23,7 @@ export FORCE=${FORCE:=""}
 ! [[ "$DEBUG" ]] || set -x
 ! [[ "$DEBUG" ]] || set -x
 
 
 has() {
 has() {
-	if [[ "$FORCE" ]] && echo " $INIT_GIMMES " | grep -q " $1 "; then
+	if [[ "$FORCE" ]] && [[ " $INIT_GIMMES " == *" $1 "* ]]; then
 		false
 		false
 	else
 	else
 		command -v "$1" >/dev/null
 		command -v "$1" >/dev/null