systemd-resolve: initial shell completion

v2:
- use /sys/class/net to list interfaces,
  also copy the same code to systemd-nspawn
v3:
- do not propose "any" twice for --type
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2016-02-18 11:50:53 -05:00
parent e1caa6e09b
commit e81eb2874e
4 changed files with 138 additions and 1 deletions
+4 -1
View File
@@ -45,7 +45,10 @@ __get_env() {
}
__get_interfaces(){
cut -f 1 -d ' ' /proc/net/dev | tail -n +3 | tr -s '\n' | tr -d ':' | xargs
{ cd /sys/class/net && echo *; } | \
while read -d' ' -r name; do
[[ "$name" != "lo" ]] && echo "$name"
done
}
_systemd_nspawn() {