From b5e746cbd49c61bf2286d897a0f328d9577f4998 Mon Sep 17 00:00:00 2001 From: exploide Date: Thu, 11 Aug 2022 17:47:27 +0200 Subject: [PATCH] completions ip: remove base interface suffix for VLAN-enabled interfaces When adding a VLAN-enabled interface, it is named like enp0s31f6.100@enp0s31f6 with the physical interface being appended behind an @. But subsequent ip commands operate on the interface name without this suffix, so it needs to be removed when completing interface names in __fish_ip_device --- share/completions/ip.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/completions/ip.fish b/share/completions/ip.fish index 912104418..31694f95a 100644 --- a/share/completions/ip.fish +++ b/share/completions/ip.fish @@ -177,7 +177,7 @@ end function __fish_ip_device command ip -o link show | while read -l a b c - printf '%s\t%s\n' (string replace ':' '' -- $b) Device + printf '%s\t%s\n' (string replace -r '(@.*)?:' '' -- $b) Device end end