about summary refs log tree commit diff
path: root/Completion/Unix/Type/_ports
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:40:48 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:40:48 +0000
commitd73cd15ba35aa8e86ec9c5580cc025efd5e15bfd (patch)
tree8aa5fca7d9f8340ccc2f88fa79497c019fc4e57c /Completion/Unix/Type/_ports
parenta37d674e64faaf39b24f016b0e863a2f6d30a4d3 (diff)
downloadzsh-d73cd15ba35aa8e86ec9c5580cc025efd5e15bfd.tar.gz
zsh-d73cd15ba35aa8e86ec9c5580cc025efd5e15bfd.tar.xz
zsh-d73cd15ba35aa8e86ec9c5580cc025efd5e15bfd.zip
moved from Completion/User/_ports
Diffstat (limited to 'Completion/Unix/Type/_ports')
-rw-r--r--Completion/Unix/Type/_ports12
1 files changed, 12 insertions, 0 deletions
diff --git a/Completion/Unix/Type/_ports b/Completion/Unix/Type/_ports
new file mode 100644
index 000000000..958917bd6
--- /dev/null
+++ b/Completion/Unix/Type/_ports
@@ -0,0 +1,12 @@
+#autoload
+
+local expl ports
+
+if ! zstyle -a ":completion:${curcontext}:" ports ports; then
+  (( $+_cache_ports )) ||
+      : ${(A)_cache_ports:=${${(M)${${(f)"$(</etc/services)"}:#\#*}#*/tcp}%%[ 	]*}}
+
+  ports=( "$_cache_ports[@]" )
+fi
+
+_wanted ports expl port compadd "$@" -a ports