mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
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
This commit is contained in:
parent
18df41e5e6
commit
b5e746cbd4
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue