The following commit has been merged in the master branch:
commit 370a550baf9466b99783b9cca64127190fd9cea2
Author: Ville Skyttä <[email protected]>
Date:   Sat Nov 5 12:09:40 2011 +0200

    _mac_addresses: Grab addresses from FreeBSD's ifconfig -a output too.

diff --git a/bash_completion b/bash_completion
index 0252769..c5cd7c9 100644
--- a/bash_completion
+++ b/bash_completion
@@ -793,9 +793,11 @@ _mac_addresses()
     local re='\([A-Fa-f0-9]\{2\}:\)\{5\}[A-Fa-f0-9]\{2\}'
     local PATH="$PATH:/sbin:/usr/sbin"
 
-    # Local interfaces (Linux only?)
+    # Local interfaces (Linux: HWAddr, FreeBSD: ether)
     COMPREPLY+=( $( ifconfig -a 2>/dev/null | sed -ne \
-        "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($re\)[[:space:]]*$/\1/p" ) )
+        "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($re\)[[:space:]]*$/\1/p" -ne \
+        "s/^[[:space:]]\{1,\}ether[[:space:]]\{1,\}\($re\)[[:space:]]*$/\1/p" \
+        ) )
 
     # ARP cache
     COMPREPLY+=( $( arp -an 2>/dev/null | sed -ne \

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-commits

Reply via email to