From 81b17f795bf2e13d85eeec5ec4d3caff9e7e8ff1 Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Tue, 28 Sep 2021 16:05:01 +0300 Subject: [PATCH] helpers: Add bash-it profile list --- lib/helpers.bash | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/helpers.bash b/lib/helpers.bash index be06b9ce..686d782d 100755 --- a/lib/helpers.bash +++ b/lib/helpers.bash @@ -561,6 +561,18 @@ _bash-it-profile-load-parse-profile() { [[ -z $bad ]] } +_bash-it-profile-list() { + about 'lists all profiles from the "profiles" directory' + _group 'lib' + + echo "Available profiles:" + for profile in "${BASH_IT}/profiles"/*.bash_it; do + profile="${profile##*/}" + echo "${profile/.bash_it/}" + done +} +} + _bash-it-profile-load() { _about 'loads a configuration from the "profile" directory' _group 'lib'