Adjusted show function to use the new format

pull/974/head
Nils Winkler 2017-05-10 11:12:05 +02:00
parent feb05b279b
commit dce0ac5b34
1 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
BASH_IT_LOAD_PRIORITY_DEFAULT_ALIAS=150 BASH_IT_LOAD_PRIORITY_DEFAULT_ALIAS=${BASH_IT_LOAD_PRIORITY_DEFAULT_ALIAS:-150}
BASH_IT_LOAD_PRIORITY_DEFAULT_PLUGIN=250 BASH_IT_LOAD_PRIORITY_DEFAULT_PLUGIN=${BASH_IT_LOAD_PRIORITY_DEFAULT_PLUGIN:-250}
BASH_IT_LOAD_PRIORITY_DEFAULT_COMPLETION=350 BASH_IT_LOAD_PRIORITY_DEFAULT_COMPLETION=${BASH_IT_LOAD_PRIORITY_DEFAULT_COMPLETION:-350}
BASH_IT_LOAD_PRIORITY_SEPARATOR="---" BASH_IT_LOAD_PRIORITY_SEPARATOR="---"
# Helper function loading various enable-able files # Helper function loading various enable-able files
@ -169,7 +169,8 @@ _bash-it-describe ()
printf "%-20s%-10s%s\n" "$column_header" 'Enabled?' 'Description' printf "%-20s%-10s%s\n" "$column_header" 'Enabled?' 'Description'
for f in $BASH_IT/$subdirectory/available/*.bash for f in $BASH_IT/$subdirectory/available/*.bash
do do
if [ -e $BASH_IT/$subdirectory/enabled/$(basename $f) ]; then # Check for both the old format without the load priority, and the extended format with the priority
if [ -e $BASH_IT/$subdirectory/enabled/$(basename $f) ] || [ -e $BASH_IT/$subdirectory/enabled/*$BASH_IT_LOAD_PRIORITY_SEPARATOR$(basename $f) ]; then
enabled='x' enabled='x'
else else
enabled=' ' enabled=' '