From 120dee2569138a6ff1d864f651418ab65eb62fb5 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Wed, 8 Sep 2021 16:02:58 -0700 Subject: [PATCH] lib/utilities: fix `_bash-it-component-list-disabled()` Use fewer subprocesses, return newline-delimited instead of space-delimited, and use `sort -u` instead of `uniq | sort` --- lib/utilities.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utilities.bash b/lib/utilities.bash index 8de71f17..322c9bdf 100644 --- a/lib/utilities.bash +++ b/lib/utilities.bash @@ -134,8 +134,8 @@ _bash-it-component-list-enabled() { } _bash-it-component-list-disabled() { - local component="$1" - _bash-it-component-help "${component}" | $(_bash-it-grep) -E -v '\[x\]' | awk '{print $1}' | uniq | sort | tr '\n' ' ' + local IFS=$'\n' component="$1" + _bash-it-component-help "${component}" | $(_bash-it-grep) -E -v '\[x\]' | awk '{print $1}' | sort -u } # Checks if a given item is enabled for a particular component/file-type.