diff --git a/lib/utilities.bash b/lib/utilities.bash index de31810e..3a891166 100644 --- a/lib/utilities.bash +++ b/lib/utilities.bash @@ -72,12 +72,14 @@ function _bash-it-grep() # completion). ########################################################################### -_bash-it-component-help() { - local component="$(_bash-it-pluralize-component "${1}")" - local file="$(_bash-it-component-cache-file "${component}")" +function _bash-it-component-help() +{ + local component file func + component="$(_bash-it-pluralize-component "${1}")" + file="$(_bash-it-component-cache-file "${component}")" if [[ ! -s "${file}" || -z "$(find "${file}" -mmin -300)" ]] ; then rm -f "${file}" 2>/dev/null - local func="_bash-it-${component}" + func="_bash-it-${component}" "${func}" | ${BASH_IT_GREP:-$(_bash-it-grep)} -E ' \[' > "${file}" fi cat "${file}"