about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Completion/User/_ports4
-rw-r--r--Completion/User/_socket2
2 files changed, 3 insertions, 3 deletions
diff --git a/Completion/User/_ports b/Completion/User/_ports
index da59fd4ea..db4ea03c8 100644
--- a/Completion/User/_ports
+++ b/Completion/User/_ports
@@ -2,9 +2,9 @@
 
 local expl ports
 
-if ! _style ports ports ports; then
+if ! _style -a ports ports ports; then
   (( $+_cache_ports )) ||
-      : ${(A)ports:=${${(M)${${(f)"$(</etc/services)"}:#\#*}#*/tcp}%%[ 	]*}}
+      : ${(A)_cache_ports:=${${(M)${${(f)"$(</etc/services)"}:#\#*}#*/tcp}%%[ 	]*}}
 
   ports=( "$_cache_ports[@]" )
 fi
diff --git a/Completion/User/_socket b/Completion/User/_socket
index 45374a403..7a7c7dccc 100644
--- a/Completion/User/_socket
+++ b/Completion/User/_socket
@@ -48,7 +48,7 @@ arg1)
 arg2)
   if (( ! $+opt_args[-s] )); then
     _wanted ports expl 'port to connect' &&
-        _combination '' hosts-ports hosts="${line[2]:q}" ports "$expl[@]"
+        _combination '' hosts-ports hosts="${line[1]:q}" ports "$expl[@]"
   fi
   ;;
 esac