Skip to content

Commit da64ce2

Browse files
Replace non-standard which with built-in command -v
1 parent e332a9e commit da64ce2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

generator.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ SH_ECHO
159159
fnName="${fn}echo${dot}Rainbow${brackets}"
160160
case "${shell}" in
161161
"fish")
162-
ifCond="if which lolcat > /dev/null"
162+
ifCond="if command -v lolcat > /dev/null"
163163
;;
164164
"ksh")
165-
ifCond='if which lolcat 2> /dev/null >&2; then'
165+
ifCond='if command -v lolcat 2> /dev/null >&2; then'
166166
;;
167167
*)
168-
ifCond='if which lolcat > /dev/null 2>&1; then'
168+
ifCond='if command -v lolcat > /dev/null 2>&1; then'
169169
;;
170170
esac
171171

0 commit comments

Comments
 (0)