bash-completion: use builtins when generating list

awk is an external program, and it is better to stick to shell built-ins.

Also, even with external awk, sort -u is redundant, because the shell does
this on its own.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2015-09-28 15:23:04 -04:00
parent 840b2c0e77
commit b00c1cf9d6

View File

@@ -24,7 +24,7 @@ __contains_word () {
}
__get_links() {
networkctl list --no-legend --no-pager --all | awk '{ print $2 }' | sort -u
networkctl list --no-legend --no-pager --all | { while read -r a b c; do echo " $b"; done; };
}
_networkctl() {