zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Chmouel Boudjnah <chmouel@mandrakesoft.com>, zsh-workers@sunsite.auc.dk
Subject: Re: completion in 3.1.9
Date: Sat, 22 Jul 2000 04:00:11 +0000	[thread overview]
Message-ID: <1000722040011.ZM3992@candle.brasslantern.com> (raw)
In-Reply-To: <m2ittzl70p.fsf@cassini.us.mandrakesoft.com>

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   


  reply	other threads:[~2000-07-22  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-21 17:36 Chmouel Boudjnah
2000-07-22  4:00 ` Bart Schaefer [this message]
2000-07-22  7:26   ` Chmouel Boudjnah
2000-07-24  9:01 Sven Wischnowsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1000722040011.ZM3992@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=chmouel@mandrakesoft.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).