From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21902 invoked from network); 13 Oct 2006 17:21:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.6 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 13 Oct 2006 17:21:23 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 49395 invoked from network); 13 Oct 2006 17:21:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Oct 2006 17:21:17 -0000 Received: (qmail 27563 invoked by alias); 13 Oct 2006 17:21:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10867 Received: (qmail 27552 invoked from network); 13 Oct 2006 17:21:08 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 13 Oct 2006 17:21:08 -0000 Received: (qmail 48147 invoked from network); 13 Oct 2006 17:21:07 -0000 Received: from flock1.newmail.ru (80.68.241.157) by a.mx.sunsite.dk with SMTP; 13 Oct 2006 17:21:05 -0000 Received: (qmail 15882 invoked from network); 13 Oct 2006 17:21:04 -0000 Received: from unknown (HELO cooker.local) (arvidjaar@newmail.ru@85.140.243.162) by smtpd.newmail.ru with SMTP; 13 Oct 2006 17:21:04 -0000 From: Andrey Borzenkov To: zsh users Subject: Re: matching commands by pattern Date: Fri, 13 Oct 2006 21:20:57 +0400 User-Agent: KMail/1.9.4 References: <20061013090422.GH4262@fsst.voodoo.lan> <200610130930.k9D9UuL7007021@news01.csr.com> <20061013104553.GJ4262@fsst.voodoo.lan> In-Reply-To: <20061013104553.GJ4262@fsst.voodoo.lan> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610132121.01845.arvidjaar@newmail.ru> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 13 October 2006 14:45, Frank Terbeck wrote: > Peter Stephenson : > > Frank Terbeck wrote: > > > I'm trying to be able to use compsys to find all completions, that are > > > possible as the first word of the command-line _and_ match a given > > > pattern. Ideally, these matches should be accessible via a completion > > > menu. > > > > It's easy: just set the option "globcomplete", that's what it's designed > > for. This makes pattern characters active during normal completion, so > > you don't have to do anything else special to get command completion in > > command position. > wow, I did not even know this one exists :) Personally I'm using these completers: zstyle ':completion:*' completer _oldlist _complete _match and it does the same, but with added bonus that all other goodies (like matchers) work too. > Thank you, Peter. > > This works. But it this way, glob_complete is in effect for every glob > on the command-line when trying to complete. > > % ls *.txt > > drops into a menu, rather than expanding the glob into .txt files. Well, you can always expand using expand-word (I believe, by default bound to ^X*). Or you could add _all_matches completer, see man page: _all_matches This completer can be used to add a string consisting of all other matches. As it influences later completers it must appear as the first completer in the list. The list of all matches is affected by the avoid-completer and old-matches styles described above. So you have choice to include either all generated matches or only part thereof. It really is more flexible than old way. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFL8r9R6LMutpd94wRAirFAKCgroYaPJPcQDiO4L69qMORmKkNQQCeMW9U u9w4zgMfO26VH51uVuxCL18= =JmGt -----END PGP SIGNATURE-----