From dce0ac5b34f385741e9015008454153448e45df3 Mon Sep 17 00:00:00 2001 From: Nils Winkler Date: Wed, 10 May 2017 11:12:05 +0200 Subject: [PATCH] Adjusted show function to use the new format --- lib/helpers.bash | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/helpers.bash b/lib/helpers.bash index 20186cec..b8258f99 100644 --- a/lib/helpers.bash +++ b/lib/helpers.bash @@ -1,6 +1,6 @@ -BASH_IT_LOAD_PRIORITY_DEFAULT_ALIAS=150 -BASH_IT_LOAD_PRIORITY_DEFAULT_PLUGIN=250 -BASH_IT_LOAD_PRIORITY_DEFAULT_COMPLETION=350 +BASH_IT_LOAD_PRIORITY_DEFAULT_ALIAS=${BASH_IT_LOAD_PRIORITY_DEFAULT_ALIAS:-150} +BASH_IT_LOAD_PRIORITY_DEFAULT_PLUGIN=${BASH_IT_LOAD_PRIORITY_DEFAULT_PLUGIN:-250} +BASH_IT_LOAD_PRIORITY_DEFAULT_COMPLETION=${BASH_IT_LOAD_PRIORITY_DEFAULT_COMPLETION:-350} BASH_IT_LOAD_PRIORITY_SEPARATOR="---" # Helper function loading various enable-able files @@ -169,7 +169,8 @@ _bash-it-describe () printf "%-20s%-10s%s\n" "$column_header" 'Enabled?' 'Description' for f in $BASH_IT/$subdirectory/available/*.bash 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' else enabled=' '