about summary refs log tree commit diff
path: root/Completion/Unix/Command/_telnet
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-06-25 09:03:04 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-06-25 09:03:04 +0000
commita267832ddf4150652fde3936858841bb2edbd9ae (patch)
tree961f0cbcaf8dbdaf2ff2e1a5409d644158f592bf /Completion/Unix/Command/_telnet
parentdd54fb249881fa882319cd2642780dcebb8d9f7c (diff)
downloadzsh-a267832ddf4150652fde3936858841bb2edbd9ae.tar.gz
zsh-a267832ddf4150652fde3936858841bb2edbd9ae.tar.xz
zsh-a267832ddf4150652fde3936858841bb2edbd9ae.zip
18631: returning too early breaks prefix-needed style set to false
Diffstat (limited to 'Completion/Unix/Command/_telnet')
-rw-r--r--Completion/Unix/Command/_telnet12
1 files changed, 7 insertions, 5 deletions
diff --git a/Completion/Unix/Command/_telnet b/Completion/Unix/Command/_telnet
index 4ff6ed2a7..bab9c8d36 100644
--- a/Completion/Unix/Command/_telnet
+++ b/Completion/Unix/Command/_telnet
@@ -5,7 +5,7 @@
 #  telnet_hosts_ports_users
 #    The array that contains 3-tuples `host:port:user'.
 
-local curcontext="$curcontext" state line expl
+local curcontext="$curcontext" state line expl ret=1
 typeset -A opt_args
 
 if (( ! $+_telnet_args )); then
@@ -43,14 +43,14 @@ fi
 _arguments -C -s \
   "$_telnet_args[@]" \
   ':host:->hosts' \
-  ':port:->ports' && return 0
+  ':port:->ports' && ret=0
 
 case "$state" in
 hosts)
   _wanted hosts expl host \
       _combination -s '[@:]' '' users-hosts-ports \
           ${opt_args[-l]:+users=${opt_args[-l]:q}} \
-          hosts -
+          hosts - && ret=0
   ;;
 
 ports)
@@ -58,7 +58,7 @@ ports)
       _combination -s '[@:]' '' users-hosts-ports \
           ${opt_args[-l]:+users=${opt_args[-l]:q}} \
           hosts="${line[1]:q}" \
-          ports -
+          ports - && ret=0
   ;;
 
 users)
@@ -66,6 +66,8 @@ users)
       _combination -s '[@:]' '' users-hosts-ports \
       ${line[2]:+hosts="${line[2]:q}"} \
       ${line[3]:+ports="${line[3]:q}"} \
-      users -
+      users - && ret=0
   ;;
 esac
+
+return ret