Skip to content

Commit

Permalink
lib: helpers: Rename _bash-it-process-component to _bash-it-determine…
Browse files Browse the repository at this point in the history
…-component-status-from-path
  • Loading branch information
Noah Gorny committed Apr 14, 2021
1 parent 4d87a3f commit 6ab34b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ _bash-it-profile-save() {
echo "" >> "$profile_path"
echo "# $subdirectory" >> "$profile_path"
for f in "${BASH_IT}/$subdirectory/available/"*.bash; do
_bash-it-process-component "$f"
_bash-it-determine-component-status-from-path "$f"
if [ "$enabled" == "x" ]; then
echo "$subdirectory $enabled_file_clean" >> "$profile_path"
fi
Expand Down Expand Up @@ -574,11 +574,11 @@ _bash-it-reload() {
popd &> /dev/null || return
}

_bash-it-process-component ()
_bash-it-determine-component-status-from-path ()
{
_about 'internal function used to process component name and check if its enabled'
_param '1: full path to available component file'
_example '$ _bash-it-process-component "${BASH_IT}/plugins/available/git.plugin.bash'
_example '$ _bash-it-determine-component-status-from-path "${BASH_IT}/plugins/available/git.plugin.bash'

# Check for both the old format without the load priority, and the extended format with the priority
declare enabled_files enabled_file
Expand Down Expand Up @@ -612,7 +612,7 @@ _bash-it-describe ()
printf "%-20s%-10s%s\n" "$column_header" 'Enabled?' 'Description'
for f in "${BASH_IT}/$subdirectory/available/"*.bash
do
_bash-it-process-component "$f"
_bash-it-determine-component-status-from-path "$f"
printf "%-20s%-10s%s\n" "$enabled_file_clean" " [$enabled]" "$(cat $f | metafor about-$file_type)"
done
printf '\n%s\n' "to enable $preposition $file_type, do:"
Expand Down

0 comments on commit 6ab34b6

Please sign in to comment.