lib/utilities: >|
parent
fbd842b2ea
commit
ffcf8f1c94
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue