From b00c1cf9d61ccd9b0f7bc131f01d80bb5736af0d Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 28 Sep 2015 15:23:04 -0400 Subject: 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. --- shell-completion/bash/networkctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell-completion') diff --git a/shell-completion/bash/networkctl b/shell-completion/bash/networkctl index 7ca2aa5a81..942c7e1c00 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() { -- cgit v1.2.3-54-g00ecf