From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22017 invoked from network); 6 Jun 2000 15:58:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Jun 2000 15:58:10 -0000 Received: (qmail 24894 invoked by alias); 6 Jun 2000 15:58:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11781 Received: (qmail 24869 invoked from network); 6 Jun 2000 15:57:54 -0000 From: "Bart Schaefer" Message-Id: <1000606155725.ZM594@candle.brasslantern.com> Date: Tue, 6 Jun 2000 15:57:25 +0000 In-Reply-To: <200006061258.OAA09450@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "PATCH: Re: blah*[TAB] (difference between 3.1.6 and 3.1.9)" (Jun 6, 2:58pm) References: <200006061258.OAA09450@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Re: blah*[TAB] (difference between 3.1.6 and 3.1.9) Cc: Vincent Lefevre MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 6, 2:58pm, Sven Wischnowsky wrote: } Subject: PATCH: Re: blah*[TAB] (difference between 3.1.6 and 3.1.9) } } > > bindkey '\t' complete-word } > > autoload -U compinit } > > compinit } > > zstyle ':completion:*' completer _expand _complete } > > zstyle ':completion:*:expand:::' glob 1 } > > zstyle ':completion:*:expand:::' substitute 1 } } And to get nearer to the expand-or-complete behaviour, you should also } use: } } zstyle ':completion:*:expand:*' tag-order all-expansions } } That will make it insert only all the expansions in the line, not } allowing you to menu between the original string, the expansions } one-by-one and all expansions at once. Eh? I just tried (again) my sequence in `zsh-3.1.9 -f' and I don't get offered a menu. I just get the expansion inserted. I get exactly the same behavior with your tag-order style as without. And if your tag-order were going to matter, shouldn't it need to be: zstyle ':completion:*:expand:*' tag-order - all-expansions because If any string in the value consists of only a hyphen, then *only* the tags specified by the other strings in the value are generated. Normally all tags not explicitly selected are tried last if the specified tags fail to generate any matches. This means that a value consisting only of a single hyphen turns off completion. } The _expand completer offers you the expansion of $ZSH_V (an empty } string) and the original and enters menu-completion so that you can } toggle between the two (with the `expansion' being inserted in the } line immediately). } } Hm, maybe we shouldn't use `empty' expansions. That would be consistent with previous version's behavior and with the behavior of expand-or-complete. -- 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