lib/utilities: fix `_bash-it-component-list()`
Use fewer subprocesses and return newline-delimited, not space-delimited.pull/1933/head
parent
bf96d01b11
commit
91b4d5a0a4
|
|
@ -118,8 +118,8 @@ _bash-it-clean-component-cache() {
|
||||||
|
|
||||||
# Returns an array of items within each compoenent.
|
# Returns an array of items within each compoenent.
|
||||||
_bash-it-component-list() {
|
_bash-it-component-list() {
|
||||||
local component="$1"
|
local IFS=$'\n' component="$1"
|
||||||
_bash-it-component-help "${component}" | awk '{print $1}' | uniq | sort | tr '\n' ' '
|
_bash-it-component-help "${component}" | awk '{print $1}' | sort -u
|
||||||
}
|
}
|
||||||
|
|
||||||
_bash-it-component-list-matching() {
|
_bash-it-component-list-matching() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue