From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2470 invoked from network); 4 Jul 2001 13:27:47 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Jul 2001 13:27:47 -0000 Received: (qmail 17270 invoked by alias); 4 Jul 2001 13:26:30 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3998 Received: (qmail 17248 invoked from network); 4 Jul 2001 13:26:25 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Nadav Har'El" Cc: "dLux" , "ZSH users mailing list" Subject: RE: completion question Date: Wed, 4 Jul 2001 17:27:02 +0400 Message-ID: <002401c1048d$02b12c30$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2479.0006 In-Reply-To: <20010704160217.B8633@leeor.math.technion.ac.il> > Maybe what is bothering him is that if you do > > /u_local/ > ^--- cursor (no space) > and press TAB, nothing is completed. If you enter a slash, > however, it works: > > /u/_local/ (or /u_/local/) > is completed to > /usr/local/ > Ah, I see. Well, somebody else have to answer this. I guess, this is what _prefix completer is for, but I never used it. As a quick try (assuming, you are using new completion): bor@itsrm2% setopt completeinword bor@itsrm2% zstyle ':completion:*' completer _oldlist _prefix _complete _match bor@itsrm2% l /usTABcal bor@itsrm2% l /usr/cal ^ cursor here It still behaves differently; zsh totally ignores suffix, while bash not. Next TAB in above example gives you in bash: MW1G017@MW1G17C ~ $ ls /usr/cal bin include local share doc info logs src etc lib man ssl i686-pc-cygwin libexec sbin tmp in zsh: bor@itsrm2% l /usr/TT_DB/cal Completing files TT_DB/ add-on/ adm@ admin/ bin/ ccs/ crash@ dt@ games/ ic/ include/ lbin/ lib/ lib64s/ local/ lost+found/ mail@ menus/ net/ news@ oasys/ opt/ options@ pkg/ preserve@ pub@ sadm/ sbin/ share/ spool@ src/ sysadm/ tmp@ ucb/ ucbinclude/ ucblib/ vmsys/ (ignore list settings). I do not know how to make them behave identically. OTOH in zsh you do not need to go back; just say /u/bTAB and it will be completed to /usr/bing. Much better :-) -andrej