From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22287 invoked from network); 15 Sep 2000 18:59:52 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Sep 2000 18:59:52 -0000 Received: (qmail 29795 invoked by alias); 15 Sep 2000 18:56:50 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3427 Received: (qmail 29771 invoked from network); 15 Sep 2000 18:56:13 -0000 From: "Bart Schaefer" Message-Id: <000915115539.ZM17342@candle.brasslantern.com> Date: Fri, 15 Sep 2000 11:55:39 -0700 In-Reply-To: <000101c01f3e$cf699350$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "RE: glob completion without menu style completion" (Sep 15, 10:00pm) References: <000101c01f3e$cf699350$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail Lite (5.0.0 30July97) To: Subject: Re: glob completion without menu style completion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 15, 10:00pm, Andrej Borsenkow wrote: > Subject: RE: glob completion without menu style completion > > > > If I don't have setopt glob_complete and I do > > > > rmdir *TAB > > > > the * gets replaced with all files in the directory that would be > > matched by * if I were to just hit return at that moment. > > > > Is there a way to get it so that when I type > > > > rmdir *TAB > > > > the * gets replaced with all the choices that the completion system > > returns at that time > > Yes, I can reproduce it. It happens, because by default TAB is bound to > expand-or-complete widget that tries expansion if it sees glob pattern > *before* it tries completion. So, it seems, that completion system sees > input line with already expanded '*' ... I personally consider it a bug, > but Sven should answer it when he is back. It's not a bug, it's the defined behavior of expand-or-complete. > You are better off if you redefine TAB to simple expand-word like > > bindkey '^I' expand-word You mean "complete-word", not "expand-word". And if you run "compinit" *after* setting your styles with zstyle, *and* you have used the _expand completer, then compinit rebinds TAB to complete-word for you, for just this reason. > In general, it is always good idea to use plain complete-word with new > completion system, because then you have much better control over possible > interpretation of patterns. Exactly.