@@ -572,7 +572,7 @@ _bash-it-profile-load-parse-profile() {
572
572
break
573
573
fi
574
574
# Do not actually modify config on dry run
575
- [[ -z $2 ]] || continue
575
+ [[ -z ${2 :- } ]] || continue
576
576
# Actually enable the component
577
577
$enable_func " $component "
578
578
done < " $1 "
@@ -704,7 +704,9 @@ function _on-disable-callback() {
704
704
_group ' lib'
705
705
706
706
local callback=" ${1} _on_disable"
707
- _command_exists " $callback " && " $callback "
707
+ if _command_exists " $callback " ; then
708
+ " $callback "
709
+ fi
708
710
}
709
711
710
712
function _disable-all() {
@@ -723,8 +725,8 @@ function _disable-plugin() {
723
725
_example ' $ disable-plugin rvm'
724
726
_group ' lib'
725
727
726
- _disable-thing " plugins" " plugin" " $1 "
727
- _on-disable-callback " $1 "
728
+ _disable-thing " plugins" " plugin" " ${1?} "
729
+ _on-disable-callback " ${1?} "
728
730
}
729
731
730
732
function _disable-alias() {
@@ -733,7 +735,7 @@ function _disable-alias() {
733
735
_example ' $ disable-alias git'
734
736
_group ' lib'
735
737
736
- _disable-thing " aliases" " alias" " $1 "
738
+ _disable-thing " aliases" " alias" " ${1?} "
737
739
}
738
740
739
741
function _disable-completion() {
@@ -742,7 +744,7 @@ function _disable-completion() {
742
744
_example ' $ disable-completion git'
743
745
_group ' lib'
744
746
745
- _disable-thing " completion" " completion" " $1 "
747
+ _disable-thing " completion" " completion" " ${1?} "
746
748
}
747
749
748
750
function _disable-thing() {
@@ -776,7 +778,7 @@ function _disable-thing() {
776
778
# Either one will be matched by this glob
777
779
for plugin in " ${BASH_IT} /enabled" /[[:digit:]][[:digit:]][[:digit:]]" ${BASH_IT_LOAD_PRIORITY_SEPARATOR}${file_entity} .${suffix} .bash" " ${BASH_IT} /$subdirectory /enabled/" {[[:digit:]][[:digit:]][[:digit:]]" ${BASH_IT_LOAD_PRIORITY_SEPARATOR}${file_entity} .${suffix} .bash" ," ${file_entity} .${suffix} .bash" }; do
778
780
if [[ -e " ${plugin} " ]]; then
779
- rm " ${plugin} "
781
+ rm -f " ${plugin} "
780
782
plugin=
781
783
break
782
784
fi
@@ -789,8 +791,9 @@ function _disable-thing() {
789
791
790
792
_bash-it-clean-component-cache " ${file_type} "
791
793
792
- if [[ " $file_entity " = " all" ]]; then
793
- printf ' %s\n' " $file_entity $( _bash-it-pluralize-component " $file_type " ) disabled."
794
+ if [[ " $file_entity " == " all" ]]; then
795
+ _bash-it-component-pluralize " ${file_type} "
796
+ printf ' %s\n' " $file_entity ${_bash_it_component_pluralize?} disabled."
794
797
else
795
798
printf ' %s\n' " $file_entity disabled."
796
799
fi
0 commit comments