From: Zbigniew Jędrzejewski-Szmek Date: Mon, 28 Sep 2015 19:23:04 +0000 (-0400) Subject: bash-completion: use builtins when generating list X-Git-Tag: v227~49^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b00c1cf9d61ccd9b0f7bc131f01d80bb5736af0d;p=thirdparty%2Fsystemd.git 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. --- diff --git a/shell-completion/bash/networkctl b/shell-completion/bash/networkctl index 7ca2aa5a81d..942c7e1c009 100644 --- a/shell-completion/bash/networkctl +++ b/shell-completion/bash/networkctl @@ -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() {