summaryrefslogtreecommitdiffstats
path: root/Completion/User/_socket
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-13 18:22:21 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-13 18:22:21 +0000
commit6818d4f69732c2547f589cba9d9c7e0b73ee6310 (patch)
tree9f79bd01cc6d0e86db57186815dbe4e3f0397f31 /Completion/User/_socket
parentmanual/7809-for-pws-4 (diff)
downloadzsh-6818d4f69732c2547f589cba9d9c7e0b73ee6310.tar
zsh-6818d4f69732c2547f589cba9d9c7e0b73ee6310.tar.gz
zsh-6818d4f69732c2547f589cba9d9c7e0b73ee6310.tar.bz2
zsh-6818d4f69732c2547f589cba9d9c7e0b73ee6310.tar.lz
zsh-6818d4f69732c2547f589cba9d9c7e0b73ee6310.tar.xz
zsh-6818d4f69732c2547f589cba9d9c7e0b73ee6310.tar.zst
zsh-6818d4f69732c2547f589cba9d9c7e0b73ee6310.zip
zsh-workers/7815
Diffstat (limited to 'Completion/User/_socket')
-rw-r--r--Completion/User/_socket14
1 files changed, 4 insertions, 10 deletions
diff --git a/Completion/User/_socket b/Completion/User/_socket
index c7605a1ac..ff8009ea1 100644
--- a/Completion/User/_socket
+++ b/Completion/User/_socket
@@ -2,10 +2,8 @@
# Parameter used:
#
-# socket_ports
-# The associative array that maps a host name to a space-separated list of
-# ports.
-
+# socket_hosts_ports
+# The array that contains paris `host:port'.
local state line expl
typeset -A options
@@ -28,18 +26,14 @@ arg1)
_message 'port to listen'
else
_description expl 'host'
- compadd "$expl[@]" - ${(k)socket_ports} || _hosts "$expl[@]"
+ _combination socket_hosts_ports hosts "$expl[@]"
fi
;;
arg2)
if (( ! $+options[-s] )); then
_description expl 'port to connect'
- if (( $+socket_ports )); then
- compadd "$expl[@]" - ${=socket_ports[$line[2]]};
- else
- _message 'port to connect';
- fi
+ _combination socket_hosts_ports hosts="${line[2]:q}" ports "$expl[@]"
fi
;;
esac