lib/utilities: `_bash-it-component-item-is-enabled()`

- Use normal `if`/`then`
pull/2061/head
John D Pell 2022-02-18 02:40:05 -08:00
parent fe48deda2d
commit 5957d189ea
1 changed files with 5 additions and 1 deletions

View File

@ -178,8 +178,12 @@ function _bash-it-component-item-is-enabled() {
for each_file in "${BASH_IT}/enabled"/*"${BASH_IT_LOAD_PRIORITY_SEPARATOR?}${item_name}.${component_type}"*."bash" \ for each_file in "${BASH_IT}/enabled"/*"${BASH_IT_LOAD_PRIORITY_SEPARATOR?}${item_name}.${component_type}"*."bash" \
"${BASH_IT}/${component_type}"*/"enabled/${item_name}.${component_type}"*."bash" \ "${BASH_IT}/${component_type}"*/"enabled/${item_name}.${component_type}"*."bash" \
"${BASH_IT}/${component_type}"*/"enabled"/*"${BASH_IT_LOAD_PRIORITY_SEPARATOR?}${item_name}.${component_type}"*."bash"; do "${BASH_IT}/${component_type}"*/"enabled"/*"${BASH_IT_LOAD_PRIORITY_SEPARATOR?}${item_name}.${component_type}"*."bash"; do
[[ -f "${each_file}" ]] && return if [[ -f "${each_file}" ]]; then
return 0
fi
done done
return 1
} }
# Checks if a given item is disabled for a particular component/file-type. # Checks if a given item is disabled for a particular component/file-type.