lib/utilities: handle unbound parameter
Expressly handle unbound $BASH_IT_GREP when testing for valuepull/1903/head
parent
233fcc3091
commit
0eff44930c
|
|
@ -58,7 +58,7 @@ _bash-it-array-dedup() {
|
||||||
|
|
||||||
# Outputs a full path of the grep found on the filesystem
|
# Outputs a full path of the grep found on the filesystem
|
||||||
_bash-it-grep() {
|
_bash-it-grep() {
|
||||||
if [[ -z "${BASH_IT_GREP}" ]] ; then
|
if [[ -z "${BASH_IT_GREP:-}" ]] ; then
|
||||||
export BASH_IT_GREP="$(which egrep || which grep || '/usr/bin/grep')"
|
export BASH_IT_GREP="$(which egrep || which grep || '/usr/bin/grep')"
|
||||||
fi
|
fi
|
||||||
printf "%s " "${BASH_IT_GREP}"
|
printf "%s " "${BASH_IT_GREP}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue