lib/utilities: >|

pull/2061/head
John D Pell 2022-02-18 00:10:20 -08:00
parent fbd842b2ea
commit ffcf8f1c94
1 changed files with 4 additions and 6 deletions

View File

@ -122,18 +122,16 @@ function _bash-it-component-pluralize() {
} }
function _bash-it-clean-component-cache() { function _bash-it-clean-component-cache() {
local component="$1" local component="${1:-}"
local cache local cache
local -a BASH_IT_COMPONENTS=(aliases plugins completions) local -a components=('aliases' 'plugins' 'completions')
if [[ -z "${component}" ]]; then if [[ -z "${component}" ]]; then
for component in "${BASH_IT_COMPONENTS[@]}"; do for component in "${components[@]}"; do
_bash-it-clean-component-cache "${component}" _bash-it-clean-component-cache "${component}"
done done
else else
_bash-it-component-cache-file "${component}" cache _bash-it-component-cache-file "${component}" cache
if [[ -f "${cache}" ]]; then : >| "${cache:?}"
rm -f "${cache}"
fi
fi fi
} }