lib/utilities: fix `_bash-it-component-list-enabled()`
Use fewer subprocesses, return newline-delimited instead of space-delimited, and use `sort -u` instead of `uniq | sort`pull/1933/head
parent
e599a9561c
commit
2391ac77c4
|
|
@ -129,8 +129,8 @@ _bash-it-component-list-matching() {
|
|||
}
|
||||
|
||||
_bash-it-component-list-enabled() {
|
||||
local component="$1"
|
||||
_bash-it-component-help "${component}" | $(_bash-it-grep) -E '\[x\]' | awk '{print $1}' | uniq | sort | tr '\n' ' '
|
||||
local IFS=$'\n' component="$1"
|
||||
_bash-it-component-help "${component}" | $(_bash-it-grep) -E '\[x\]' | awk '{print $1}' | sort -u
|
||||
}
|
||||
|
||||
_bash-it-component-list-disabled() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue