From a267832ddf4150652fde3936858841bb2edbd9ae Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 25 Jun 2003 09:03:04 +0000 Subject: 18631: returning too early breaks prefix-needed style set to false --- Completion/Unix/Command/_telnet | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Completion/Unix/Command/_telnet') 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 -- cgit v1.2.3-70-g09d2