ip completions: fix case statements for show/save/flush

An errant end prevented the relevant section of the switch statement from being evaluated.

Fixes #9008.

Thanks to caoczy@github for the diagnosis.
This commit is contained in:
David Adam 2022-06-08 21:44:39 +08:00
parent c20a71c99f
commit 219a15d1db

View File

@ -298,27 +298,27 @@ function __fish_complete_ip
end
# TODO: Moar
end
case show save flush # These take the same args
switch $cmd[-2]
case dev
__fish_ip_device
case scope
__fish_ip_scope
case to
# Prefix
case label
# Label-pattern
case '*'
printf '%s\t%s\n' up "Only active devices" \
dev "Limit to a certain device" \
scope "Limit scope" \
to "Limit prefix" \
label "Limit by label" \
dynamic "(Ipv6 only) Limit to dynamic addresses" \
permanent "(Ipv6 only) Limit to permanent addresses"
__fish_ip_device
# TODO: Moar
end
end
case show save flush # These take the same args
switch $cmd[-2]
case dev
__fish_ip_device
case scope
__fish_ip_scope
case to
# Prefix
case label
# Label-pattern
case '*'
printf '%s\t%s\n' up "Only active devices" \
dev "Limit to a certain device" \
scope "Limit scope" \
to "Limit prefix" \
label "Limit by label" \
dynamic "(Ipv6 only) Limit to dynamic addresses" \
permanent "(Ipv6 only) Limit to permanent addresses"
__fish_ip_device
# TODO: Moar
end
end
end