diff --git a/lib/helpers.bash b/lib/helpers.bash index be320564..8430459a 100644 --- a/lib/helpers.bash +++ b/lib/helpers.bash @@ -785,7 +785,7 @@ function _disable-thing() { fi fi - _bash-it-clean-component-cache "${file_type}" + _bash-it-component-cache-clean "${file_type}" if [[ "$file_entity" == "all" ]]; then _bash-it-component-pluralize "$file_type" file_type @@ -884,7 +884,7 @@ function _enable-thing() { ln -s "../$subdirectory/available/$to_enable" "${BASH_IT}/enabled/${use_load_priority}${BASH_IT_LOAD_PRIORITY_SEPARATOR}${to_enable}" fi - _bash-it-clean-component-cache "${file_type}" + _bash-it-component-cache-clean "${file_type}" printf '%s\n' "$file_entity enabled with priority $use_load_priority." } diff --git a/lib/search.bash b/lib/search.bash index 4b7f5cdd..7073f879 100644 --- a/lib/search.bash +++ b/lib/search.bash @@ -70,7 +70,7 @@ function _bash-it-search() { return 0 ;; '-r' | '--refresh') - _bash-it-clean-component-cache + _bash-it-component-cache-clean ;; '-c' | '--no-color') BASH_IT_SEARCH_USE_COLOR=false @@ -333,7 +333,7 @@ function _bash-it-search-result() { printf '%b' "${color_off} " done - ((modified)) && _bash-it-clean-component-cache "${component}" + ((modified)) && _bash-it-component-cache-clean "${component}" printf "\n" fi } diff --git a/lib/utilities.bash b/lib/utilities.bash index 180d66f0..d576c8e4 100644 --- a/lib/utilities.bash +++ b/lib/utilities.bash @@ -121,13 +121,13 @@ function _bash-it-component-pluralize() { printf -v "${_result?}" '%s' "${_component_to_plural}" } -function _bash-it-clean-component-cache() { +function _bash-it-component-cache-clean() { local component="${1:-}" local cache local -a components=('aliases' 'plugins' 'completions') if [[ -z "${component}" ]]; then for component in "${components[@]}"; do - _bash-it-clean-component-cache "${component}" + _bash-it-component-cache-clean "${component}" done else _bash-it-component-cache-file "${component}" cache