From 87dede96c0fe8961081310284bfe58972dd801c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 1 Feb 2013 19:39:03 +0200 Subject: [PATCH] _mac_addresses: Try ARP cache with "ip neigh" if arp is not available. --- bash_completion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash_completion b/bash_completion index f559f9b4..869218fc 100644 --- a/bash_completion +++ b/bash_completion @@ -830,7 +830,7 @@ _mac_addresses() ) ) # ARP cache - COMPREPLY+=( $( arp -an 2>/dev/null | sed -ne \ + COMPREPLY+=( $( { arp -an || ip neigh show; } 2>/dev/null | sed -ne \ "s/.*[[:space:]]\($re\)[[:space:]].*/\1/p" -ne \ "s/.*[[:space:]]\($re\)[[:space:]]*$/\1/p" ) )