From 91b4d5a0a4edb876df4b95c1f11d34835705f1b6 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Wed, 8 Sep 2021 15:58:32 -0700 Subject: [PATCH] lib/utilities: fix `_bash-it-component-list()` Use fewer subprocesses and return newline-delimited, not space-delimited. --- lib/utilities.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utilities.bash b/lib/utilities.bash index 67099b78..4aecc16a 100644 --- a/lib/utilities.bash +++ b/lib/utilities.bash @@ -118,8 +118,8 @@ _bash-it-clean-component-cache() { # Returns an array of items within each compoenent. _bash-it-component-list() { - local component="$1" - _bash-it-component-help "${component}" | awk '{print $1}' | uniq | sort | tr '\n' ' ' + local IFS=$'\n' component="$1" + _bash-it-component-help "${component}" | awk '{print $1}' | sort -u } _bash-it-component-list-matching() {