_mac_addresses: Use explicit C locale for ifconfig (Debian: #704832).

This commit is contained in:
Thilo Six 2013-04-06 21:11:54 +03:00 committed by Ville Skyttä
parent 94b7e63f6d
commit a9db458339

View File

@ -825,7 +825,8 @@ _mac_addresses()
# - ifconfig on Linux: HWaddr or ether
# - ifconfig on FreeBSD: ether
# - ip link: link/ether
COMPREPLY+=( $( { ifconfig -a || ip link show; } 2>/dev/null | sed -ne \
COMPREPLY+=( $( \
{ LC_ALL=C ifconfig -a || ip link show; } 2>/dev/null | sed -ne \
"s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($re\)[[:space:]].*/\1/p" -ne \
"s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($re\)[[:space:]]*$/\1/p" -ne \
"s|.*[[:space:]]\(link/\)\{0,1\}ether[[:space:]]\{1,\}\($re\)[[:space:]].*|\2|p" -ne \