completions/ip: Use command (#8334)

Add "command" directive in front of ip commands to prevent bug from a buggy aliased "ip"
This commit is contained in:
zaleoth 2021-10-05 20:47:49 +02:00 committed by GitHub
parent 86a442fb62
commit df9f01dd50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,7 +176,7 @@ function __fish_ip_commandwords
end end
function __fish_ip_device function __fish_ip_device
ip -o link show | while read -l a b c 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 ':' '' -- $b) Device
end end
end end
@ -195,7 +195,7 @@ function __fish_ip_scope
end end
function __fish_ip_netns_list function __fish_ip_netns_list
ip netns list | while read -l a b c command ip netns list | while read -l a b c
echo -- $a echo -- $a
end end
end end
@ -264,7 +264,7 @@ function __fish_complete_ip
case delete case delete
switch $count switch $count
case 3 case 3
ip -o addr show | while read -l a b c d e command ip -o addr show | while read -l a b c d e
echo $d echo $d
end end
case 4 case 4
@ -276,7 +276,7 @@ function __fish_complete_ip
case 5 case 5
switch $cmd[-2] switch $cmd[-2]
case dev case dev
ip -o addr show | string match "*$cmd[3]*" | while read -l a b c command ip -o addr show | string match "*$cmd[3]*" | while read -l a b c
echo $b echo $b
end end
# TODO: Moar # TODO: Moar