]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bash-completion: remove one more sort and sub-shell 1419/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 28 Sep 2015 21:23:53 +0000 (17:23 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 28 Sep 2015 21:23:53 +0000 (17:23 -0400)
{} is preferred to (), because the first is just grouping, while the
second invokes a separate shell.

shell-completion/bash/systemctl.in

index c8e17de7bc3884be68446e0ef960517f76f7c55d..29bb41c436da28093c46b39c79a33a28d79fe761 100644 (file)
@@ -87,8 +87,8 @@ __get_all_unit_files () { { __systemctl $1 list-unit-files; } | { while read -r
 
 __get_machines() {
         local a b
-        (machinectl list-images --no-legend --no-pager; machinectl list --no-legend --no-pager) | \
-               { while read a b; do echo " $a"; done; } | sort -u;
+        { machinectl list-images --no-legend --no-pager; machinectl list --no-legend --no-pager; } | \
+               { while read a b; do echo " $a"; done; }
 }
 
 _systemctl () {