summary refs log tree commit diff
path: root/Completion/BSD
diff options
context:
space:
mode:
authorMatthew Martin <phy1729@gmail.com>2022-03-18 20:49:48 -0500
committerMatthew Martin <phy1729@gmail.com>2022-03-18 20:52:18 -0500
commit78649ac72596104cfcbaad9a5a7d1a1afa981a4c (patch)
treec5fb6fcd1654afc478af052a350fe5df70b1e321 /Completion/BSD
parent8dd733dfd2d2c72f063c7eba3482d870e2ec26c3 (diff)
downloadzsh-78649ac72596104cfcbaad9a5a7d1a1afa981a4c.tar.gz
zsh-78649ac72596104cfcbaad9a5a7d1a1afa981a4c.tar.xz
zsh-78649ac72596104cfcbaad9a5a7d1a1afa981a4c.zip
49852: Add _routing_domains and _routing_tables types
Diffstat (limited to 'Completion/BSD')
-rw-r--r--Completion/BSD/Command/_pfctl2
-rw-r--r--Completion/BSD/Type/_routing_domains6
-rw-r--r--Completion/BSD/Type/_routing_tables6
3 files changed, 13 insertions, 1 deletions
diff --git a/Completion/BSD/Command/_pfctl b/Completion/BSD/Command/_pfctl
index 23898882f..812e52bdb 100644
--- a/Completion/BSD/Command/_pfctl
+++ b/Completion/BSD/Command/_pfctl
@@ -66,7 +66,7 @@ case $OSTYPE in
       "-N[don't perform domain name resolution]"
       '-P[display ports using service names]'
       '-S+[store pf state table in the specified file]:file:_files'
-      '-V+[select routing domain to be used to kill states]:routing domain'
+      '-V+[select routing domain to be used to kill states]:routing domain:_routing_domains'
     )
   ;;
   (free|net)bsd*)
diff --git a/Completion/BSD/Type/_routing_domains b/Completion/BSD/Type/_routing_domains
new file mode 100644
index 000000000..4bb9f78b0
--- /dev/null
+++ b/Completion/BSD/Type/_routing_domains
@@ -0,0 +1,6 @@
+#autoload
+
+local expl
+
+_description routing-domains expl 'routing domain'
+compadd "$@" "$expl[@]" -  ${${(M)${(f)"$(_call_program routing-domains netstat -R)"}:#Rdomain *}#Rdomain }
diff --git a/Completion/BSD/Type/_routing_tables b/Completion/BSD/Type/_routing_tables
new file mode 100644
index 000000000..3ba1931fe
--- /dev/null
+++ b/Completion/BSD/Type/_routing_tables
@@ -0,0 +1,6 @@
+#autoload
+
+local expl
+
+_description routing-tables expl 'routing table'
+compadd "$@" "$expl[@]" -  ${(s: :)${${(M)${(f)"$(_call_program routing-tables netstat -R)"}:#  Routing tables#: *}#*: }}