diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-12-17 03:13:15 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-12-17 03:13:15 +0100 |
commit | d5acf7da914d5ce3493cbd8ef18ae67817207d45 (patch) | |
tree | ed6dfde2ce0793f911875bdb9d76d8fb934fafb8 /shell-completion/bash/systemd-nspawn | |
parent | Fixed small typo in 70-mouse.hwdb (diff) | |
download | systemd-d5acf7da914d5ce3493cbd8ef18ae67817207d45.tar.xz systemd-d5acf7da914d5ce3493cbd8ef18ae67817207d45.zip |
bash-completion: fix __get_interfaces()
Diffstat (limited to 'shell-completion/bash/systemd-nspawn')
-rw-r--r-- | shell-completion/bash/systemd-nspawn | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell-completion/bash/systemd-nspawn b/shell-completion/bash/systemd-nspawn index 62bb0ba605..3ba2cd6ec9 100644 --- a/shell-completion/bash/systemd-nspawn +++ b/shell-completion/bash/systemd-nspawn @@ -44,9 +44,9 @@ __get_env() { env | { while read a; do echo " ${a%%=*}"; done; }; } -__get_interfaces() { - { cd /sys/class/net && echo *; } | \ - while read -d' ' -r name; do +__get_interfaces(){ + local name + for name in $(cd /sys/class/net && ls); do [[ "$name" != "lo" ]] && echo "$name" done } |