bash-completion: fix __get_interfaces()

This commit is contained in:
Yu Watanabe
2018-12-17 11:13:15 +09:00
parent bd1c8360a4
commit d5acf7da91
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -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
}