Describe function supports new directory structure
parent
9080f0e869
commit
9f3ef22538
|
|
@ -223,7 +223,7 @@ _bash-it-describe ()
|
|||
for f in "${BASH_IT}/$subdirectory/available/"*.bash
|
||||
do
|
||||
# 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
|
||||
if [ -e "${BASH_IT}/enabled/"*$BASH_IT_LOAD_PRIORITY_SEPARATOR$(basename $f) ] || [ -e "${BASH_IT}/$subdirectory/enabled/"$(basename $f) ] || [ -e "${BASH_IT}/$subdirectory/enabled/"*$BASH_IT_LOAD_PRIORITY_SEPARATOR$(basename $f) ]; then
|
||||
enabled='x'
|
||||
else
|
||||
enabled=' '
|
||||
|
|
|
|||
|
|
@ -388,6 +388,20 @@ function __migrate_all_components() {
|
|||
_bash-it-plugins | grep "nvm" | grep "\[x\]"
|
||||
}
|
||||
|
||||
@test "bash-it: describe the nvm plugin after enabling it in the old directory" {
|
||||
ln -s $BASH_IT/plugins/available/nvm.plugin.bash $BASH_IT/plugins/enabled/nvm.plugin.bash
|
||||
assert [ -L "$BASH_IT/plugins/enabled/nvm.plugin.bash" ]
|
||||
|
||||
_bash-it-plugins | grep "nvm" | grep "\[x\]"
|
||||
}
|
||||
|
||||
@test "bash-it: describe the nvm plugin after enabling it in the old directory with priority" {
|
||||
ln -s $BASH_IT/plugins/available/nvm.plugin.bash $BASH_IT/plugins/enabled/225---nvm.plugin.bash
|
||||
assert [ -L "$BASH_IT/plugins/enabled/225---nvm.plugin.bash" ]
|
||||
|
||||
_bash-it-plugins | grep "nvm" | grep "\[x\]"
|
||||
}
|
||||
|
||||
@test "bash-it: describe the todo.txt-cli aliases without enabling them" {
|
||||
run _bash-it-aliases
|
||||
assert_line "todo.txt-cli [ ] todo.txt-cli abbreviations"
|
||||
|
|
|
|||
Loading…
Reference in New Issue