summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_ip
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:32:59 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:58:59 +0200
commitdb38e167634b6c2217eec3a5aafc37c46d9e5a8d (patch)
treedaa342d423febbd3a5a7ef97053037677fab004a /Completion/Unix/Command/_ip
parent01eea47617a6e06debdb4330f92ae69f92089fd2 (diff)
parent3c3c8d3d13fd4cf6c03f81ca8dc18a1efd561728 (diff)
downloadzsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.tar.gz
zsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Unix/Command/_ip')
-rw-r--r--Completion/Unix/Command/_ip10
1 files changed, 7 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_ip b/Completion/Unix/Command/_ip
index f880f2683..bfa7d995b 100644
--- a/Completion/Unix/Command/_ip
+++ b/Completion/Unix/Command/_ip
@@ -8,8 +8,11 @@
#
# Values encoding simple types
#
-local -a subcmd_dev
-subcmd_dev=(/$'[[:alpha:]]##[[:digit:]]##(\.[[:digit:]]##)#\0'/ ':interfaces:network interface:_net_interfaces')
+local -a subcmd_dev net_intf_disp net_intf_list
+# subcmd_dev=(/$'[[:alnum:][:punct:][:cntrl:][:digit:]]##\0'/ ':interfaces:network interface:_net_interfaces')
+_find_net_interfaces
+subcmd_dev=(/"(${(j.|.)net_intf_list})"$'\0'/
+ ':interfaces:network interface:_net_interfaces')
local -a subcmd_onoff
subcmd_onoff=(/$'(on|off)\0'/ ':onoff:state (on or off):(on off)')
@@ -38,6 +41,7 @@ subcmd_ipaddrs=(
/$'(<->(.<->(.<->(.<->|)|)|)|[:[:xdigit]]#:[:[:xdigit:]]#)(|/<->)\0'/
":ipaddress:IP address (v4 or v6) currently set:( $(ip addr show | sed -n 's/^ *inet6* \([0-9a-f\.:/]*\) .*$/\1/p') )"
)
+local -a subcmd_prefix_label
subcmd_prefix_label=(
/$'(<->(.<->(.<->(.<->|)|)|)|[:[:xdigit]]#:[:[:xdigit:]]#)(|/<->)\0'/
":ipaddresslabel:IP addrlabel prefix currently set:( $(ip -6 addrlabel list 2>/dev/null | sed -n 's/^prefix \([0-9a-f\.:/]*\) .*$/\1/p') )"
@@ -98,7 +102,7 @@ _regex_words nexthop 'nexthop route keyword' \
'weight:specify relative quality of route:$subcmd_number'
subcmd_nexthop=("$reply[@]" "#")
-local -a subcmd_rtproto
+local -a subcmd_rtprotocol
_regex_words rtprotocol 'route protocol' \
'redirect:installed from ICMP redirect' \
'kernel:installed automatically by kernel' \