diff options
author | 2018-12-17 11:13:15 +0900 | |
---|---|---|
committer | 2018-12-17 11:13:15 +0900 | |
commit | d5acf7da914d5ce3493cbd8ef18ae67817207d45 (patch) | |
tree | ed6dfde2ce0793f911875bdb9d76d8fb934fafb8 /shell-completion/bash | |
parent | Fixed small typo in 70-mouse.hwdb (diff) | |
download | systemd-d5acf7da914d5ce3493cbd8ef18ae67817207d45.tar.gz systemd-d5acf7da914d5ce3493cbd8ef18ae67817207d45.tar.bz2 systemd-d5acf7da914d5ce3493cbd8ef18ae67817207d45.zip |
bash-completion: fix __get_interfaces()
Diffstat (limited to 'shell-completion/bash')
-rw-r--r-- | shell-completion/bash/resolvectl | 4 | ||||
-rw-r--r-- | shell-completion/bash/systemd-nspawn | 6 | ||||
-rw-r--r-- | shell-completion/bash/systemd-resolve | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/shell-completion/bash/resolvectl b/shell-completion/bash/resolvectl index 8d71f8b61..f8167c63d 100644 --- a/shell-completion/bash/resolvectl +++ b/shell-completion/bash/resolvectl @@ -25,8 +25,8 @@ __contains_word () { } __get_interfaces(){ - { cd /sys/class/net && echo *; } | \ - while read -d' ' -r name; do + local name + for name in $(cd /sys/class/net && ls); do [[ "$name" != "lo" ]] && echo "$name" done } diff --git a/shell-completion/bash/systemd-nspawn b/shell-completion/bash/systemd-nspawn index 62bb0ba60..3ba2cd6ec 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 } diff --git a/shell-completion/bash/systemd-resolve b/shell-completion/bash/systemd-resolve index 86b8db2cf..cd0231a6f 100644 --- a/shell-completion/bash/systemd-resolve +++ b/shell-completion/bash/systemd-resolve @@ -24,8 +24,8 @@ __contains_word () { } __get_interfaces(){ - { cd /sys/class/net && echo *; } | \ - while read -d' ' -r name; do + local name + for name in $(cd /sys/class/net && ls); do [[ "$name" != "lo" ]] && echo "$name" done } |