From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18875 invoked from network); 22 Jul 2000 04:00:36 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Jul 2000 04:00:36 -0000 Received: (qmail 17985 invoked by alias); 22 Jul 2000 04:00:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12346 Received: (qmail 17978 invoked from network); 22 Jul 2000 04:00:20 -0000 From: "Bart Schaefer" Message-Id: <1000722040011.ZM3992@candle.brasslantern.com> Date: Sat, 22 Jul 2000 04:00:11 +0000 In-Reply-To: Comments: In reply to Chmouel Boudjnah "completion in 3.1.9" (Jul 21, 10:36am) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Chmouel Boudjnah , zsh-workers@sunsite.auc.dk Subject: Re: completion in 3.1.9 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 21, 10:36am, Chmouel Boudjnah wrote: } Subject: completion in 3.1.9 } } In pristine 3.1.9 the completion has the problem i have reported a } while ago and it was corrected in the cvs tree. [...] } would be possible to have a backward patches, i can't find it in the } archives of the ml. It was article 12225, which can be discovered by searching for _rpm in the ChangeLog file. It's easy to generate patches against known past revisions with cvs. What I don't know for sure is whether any of the following depends on any of the other changes to Zle/*.c in order to work properly. zagzig[200] cvs -z3 diff -rzsh-3_1_9 -u Completion/Linux/_rpm Index: Completion/Linux/_rpm =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Linux/_rpm,v retrieving revision 1.13 retrieving revision 1.15 diff -u -r1.13 -r1.15 --- Completion/Linux/_rpm 2000/06/05 02:23:53 1.13 +++ Completion/Linux/_rpm 2000/07/12 09:01:41 1.15 @@ -41,7 +41,7 @@ # Used by `_arguments', made local here. -local curcontext="$curcontext" state lstate line +local curcontext="$curcontext" state lstate line nm="$compstate[nmatches]" typeset -A opt_args state='' @@ -211,12 +211,14 @@ _files -g \*.spec && ret=0 ;; package_file) - if compset -P '(f|ht)tp://'; then - _hosts -S/ && ret=0 + _wanted files expl 'RPM package file' \ + _files -g '*.(#i)rpm' && ret=0 + if [[ -prefix 1 (f|ht)tp:// ]]; then + _wanted urls expl 'URL of RPM package file' \ + _urls -f -g '*.(#i)rpm' "${expl[@]}" && ret=0 else - _alternative \ - 'files:RPM package file:_files -g \*.\(\#i\)rpm' \ - 'prefixes:URL prefix:compadd ftp:// http://' && ret=0 + _wanted urls expl 'URL of RPM package file' \ + compadd -S '' "${expl[@]}" ftp:// http:// && ret=0 fi ;; package_src) @@ -244,6 +246,8 @@ _files "$expl[@]" -/ && ret=0 ;; esac + + [[ ret -eq 0 || $nm -ne $compstate[nmatches] ]] && return 0 done return ret -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net