Skip to content

Commit

Permalink
_mac_addresses: Use explicit C locale for ifconfig (Debian: #704832).
Browse files Browse the repository at this point in the history
  • Loading branch information
Thilo Six authored and scop committed Apr 6, 2013
1 parent 94b7e63 commit a9db458
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit a9db458

Please sign in to comment.