From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7527 invoked from network); 9 Mar 1999 14:51:47 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Mar 1999 14:51:47 -0000 Received: (qmail 25979 invoked by alias); 9 Mar 1999 14:51:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5714 Received: (qmail 25954 invoked from network); 9 Mar 1999 14:51:06 -0000 Date: Tue, 9 Mar 1999 15:50:23 +0100 (MET) Message-Id: <199903091450.PAA14408@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Tue, 9 Mar 1999 17:23:36 +0300 Subject: Re: Fun with new completion Andrej Borsenkow wrote: > I have /archive/pub/unix/sudo/ with cu-sudo* files in it. I forgot, that > they are prefixed with cu- and did > > gzcat /a/p/u/s/s > > with the nice result > > gzcat //a > > Plain old multicomp just beeps and leaves the string as is. Now, it is > _really_ hard to decide what to do ... Should it complete as far as > possible? Or, if nothing matches, leave command line as is? Again, the > problem is, zsh cannot read your mind and decide, where was the error. At least it shouldn't give what it gives now... this was something that looked good for the things I tried it with but sometimes... The patch below makes it leave the line unchanged. A probably better solution would have a second loop over the `-W' paths to try to expand as much of the path as possible. Hm, I /think/ that would be better... Bye Sven P.S.: The senders in the summary of my mail reader look like a party of ping-pong between Andrej and me... diff -u oc/Core/_path_files Completion/Core/_path_files --- oc/Core/_path_files Tue Mar 9 15:31:15 1999 +++ Completion/Core/_path_files Tue Mar 9 15:46:06 1999 @@ -261,9 +261,6 @@ # next `-W' path. if [[ $#collect -eq 0 ]]; then - compadd -QU "$addpfx[@]" "$addsfx[@]" "$group[@]" "$expl[@]" \ - -i "$IPREFIX" -p "${linepath:q}${testpath:q}" -S "/${ostr#*/}" \ - -W "$tmp1" -f "$ignore[@]" - "${(@)tmp1:q}" continue 2 elif [[ $#collect -ne 1 ]]; then # If we have more than one possible match, this means that the -- Sven Wischnowsky wischnow@informatik.hu-berlin.de