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`pull/1933/head
parent
2391ac77c4
commit
120dee2569
|
|
@ -134,8 +134,8 @@ _bash-it-component-list-enabled() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_bash-it-component-list-disabled() {
|
_bash-it-component-list-disabled() {
|
||||||
local component="$1"
|
local IFS=$'\n' component="$1"
|
||||||
_bash-it-component-help "${component}" | $(_bash-it-grep) -E -v '\[x\]' | awk '{print $1}' | uniq | sort | tr '\n' ' '
|
_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.
|
# Checks if a given item is enabled for a particular component/file-type.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue