Use _bash-it-egrep()

This commit is contained in:
John D Pell
2021-10-18 15:48:27 -04:00
parent 2d1bd82575
commit 00f5f2a62e
3 changed files with 9 additions and 10 deletions

View File

@@ -711,8 +711,8 @@ _enable-thing ()
# Load the priority from the file if it present there
declare local_file_priority use_load_priority
local_file_priority=$(grep -E "^# BASH_IT_LOAD_PRIORITY:" "${BASH_IT}/$subdirectory/available/$to_enable" | awk -F': ' '{ print $2 }')
use_load_priority=${local_file_priority:-$load_priority}
local_file_priority="$(_bash-it-egrep "^# BASH_IT_LOAD_PRIORITY:" "${BASH_IT}/$subdirectory/available/$to_enable" | awk -F': ' '{ print $2 }')"
use_load_priority="${local_file_priority:-$load_priority}"
ln -s ../$subdirectory/available/$to_enable "${BASH_IT}/enabled/${use_load_priority}${BASH_IT_LOAD_PRIORITY_SEPARATOR}${to_enable}"
fi