]>
Commit | Line | Data |
---|---|---|
2b28026e JB |
1 | --- bash-completion-2.11/bash_completion.orig 2021-03-06 22:21:09.007031994 +0100 |
2 | +++ bash-completion-2.11/bash_completion 2021-03-06 22:24:28.382618551 +0100 | |
3 | @@ -981,11 +981,10 @@ _ip_addresses() | |
4 | *) n= ;; | |
5 | esac | |
3f34a965 | 6 | local PATH=$PATH:/sbin |
2b28026e JB |
7 | - local addrs=$({ |
8 | - LC_ALL=C ifconfig -a || ip addr show | |
9 | - } 2>/dev/null | | |
10 | - command sed -e 's/[[:space:]]addr:/ /' -ne \ | |
11 | - "s|.*inet${n}[[:space:]]\{1,\}\([^[:space:]/]*\).*|\1|p") | |
12 | + local addrs=$( | |
13 | + LC_ALL=C ip -o addr show | |
14 | + 2>/dev/null | | |
15 | + command awk '{ gsub(/\/.*$/, "", $4); print $4 }' | sort) | |
16 | COMPREPLY+=($(compgen -W "$addrs" -- "${cur-}")) | |
3f34a965 AO |
17 | } |
18 |