From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27392 invoked from network); 30 Jan 2000 04:13:05 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Jan 2000 04:13:05 -0000 Received: (qmail 29514 invoked by alias); 30 Jan 2000 04:12:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9475 Received: (qmail 29505 invoked from network); 30 Jan 2000 04:12:58 -0000 To: zsh-workers@sunsite.auc.dk Subject: PATCH: replace a for-loop by a K flag in _telnet MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 30 Jan 2000 13:12:56 +0900 Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) This replaces a for-loop by a K flag in _telnet. Index: Completion/User/_telnet =================================================================== RCS file: /projects/zsh/zsh/Completion/User/_telnet,v retrieving revision 1.1.1.12 diff -u -r1.1.1.12 _telnet --- Completion/User/_telnet 1999/11/23 15:44:13 1.1.1.12 +++ Completion/User/_telnet 2000/01/30 03:46:33 @@ -9,38 +9,34 @@ typeset -A opt_args if (( ! $+_telnet_args )); then - local k help="$(telnet -\? < /dev/null 2>&1)" + local help="$(telnet -\? < /dev/null 2>&1)" local -A optionmap - optionmap=( "[-8]" '-8[allow 8-Bit data]' \ - "[-E]" '-E[disable an escape character]' \ - "[-K]" '-K[no automatic login]' \ - "[-L]" '-L[allow 8-Bit data on output]' \ - "[-N]" '-N[supress reverse lookup]' \ - "[-S tos]" '-S+:IP type-of-service:' \ - "[-X atype]" '-X+:authentication type to disable:' \ - "[-a]" '-a[attempt automatic login]' \ - "[-c]" '-c[disable .telnetrc]' \ - "[-d]" '-d[debug mode]' \ - "[-e char]" '-e+[specify escape character]:escape character:' \ - "[-f/" '-f' \ - "/-F]" '-F' \ - "[-k realm]" '-k+:realm:' \ - "[-l user]" '-l+[specify user]:user:->users' \ - "[-n tracefile]" '-n+[specify tracefile]:tracefile:_files' \ - "[-r]" '-r[rlogin like user interface]' \ - "[-s src_addr]" '-s+[set source IP address]:src_addr:' \ - "[-x]" '-x' \ - "[-t transcom]" '-t+:transcom:' \ - "[-noasynch]" '-noasynch' \ - "[-noasyncnet]" '-noasyncnet' \ - "[-noasynctty]" '-noasynctty' ) - - _telnet_args=() - for k in ${(k)optionmap} - do - [[ "$help" = *"$k"* ]] && - _telnet_args=( "$_telnet_args[@]" "$optionmap[$k]" ) - done + optionmap=( + '*\[-8\]*' '-8[allow 8-Bit data]' + '*\[-E\]*' '-E[disable an escape character]' + '*\[-K\]*' '-K[no automatic login]' + '*\[-L\]*' '-L[allow 8-Bit data on output]' + '*\[-N\]*' '-N[supress reverse lookup]' + '*\[-S tos\]*' '-S+:IP type-of-service:' + '*\[-X atype\]*' '-X+:authentication type to disable:' + '*\[-a\]*' '-a[attempt automatic login]' + '*\[-c\]*' '-c[disable .telnetrc]' + '*\[-d\]*' '-d[debug mode]' + '*\[-e char\]*' '-e+[specify escape character]:escape character:' + '*\[-f/*' '-f' + '*/-F\]*' '-F' + '*\[-k realm\]*' '-k+:realm:' + '*\[-l user\]*' '-l+[specify user]:user:->users' + '*\[-n tracefile\]*' '-n+[specify tracefile]:tracefile:_files' + '*\[-r\]*' '-r[rlogin like user interface]' + '*\[-s src_addr\]*' '-s+[set source IP address]:src_addr:' + '*\[-x\]*' '-x' + '*\[-t transcom\]*' '-t+:transcom:' + '*\[-noasynch\]*' '-noasynch' + '*\[-noasyncnet\]*' '-noasyncnet' + '*\[-noasynctty\]*' '-noasynctty' + ) + _telnet_args=($optionmap[(K)"$help"]) fi _arguments -C -s \ -- Tanaka Akira