From b3fd8aada8934a32a7b87cb1033e2facdacf22b2 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Fri, 17 Sep 2021 23:17:29 -0700 Subject: [PATCH] lib/utilities: lint `_bash-it-component-help` --- lib/utilities.bash | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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}"