mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user