From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6889 invoked from network); 3 Sep 1999 05:26:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Sep 1999 05:26:10 -0000 Received: (qmail 7646 invoked by alias); 3 Sep 1999 05:25:55 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2558 Received: (qmail 7639 invoked from network); 3 Sep 1999 05:25:53 -0000 From: "Bart Schaefer" Message-Id: <990903052549.ZM25164@candle.brasslantern.com> Date: Fri, 3 Sep 1999 05:25:49 +0000 In-Reply-To: <19990903003925.A7942@rom.oit.gatech.edu> Comments: In reply to Will Day "different kind of glob_complete?" (Sep 3, 12:39am) References: <19990903003925.A7942@rom.oit.gatech.edu> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh users mailing list Subject: Re: different kind of glob_complete? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 3, 12:39am, Will Day wrote: } Subject: different kind of glob_complete? } } Here's something I've been wondering about - can I get zsh to perform menu } completion of glob patterns that match exactly the end of a string? } } I'm thinking this would be like glob_complete: } but _without_ the trailing '*'? This is interesting. Compare manual entries; here again is 3.1.6: GLOB_COMPLETE When the current word has a glob pattern, do not insert all the words resulting from the expansion but generate matches as for completion and cycle through them like MENU_COMPLETE. The matches are generated as if a `*' is added to the end of the word or inserted at the cursor if COMPLETE_IN_WORD is set. Since this doesn't use globbing, it works not only for files but for all completions, such as options, user names, etc. Here is 3.0.6: GLOB_COMPLETE When the current word has a glob pattern, do not insert all the words resulting from the expansion but cycle through them like `MENU_COMPLETE'. If no matches are found, a `*' is added to the !!!!!!!!!!!!!!!!!!!!!!!^^^^^^^^^^^^^^^^^^^^^^^ end of the word, or inserted at the cursor if `COMPLETE_IN_WORD' ^^^^^^^^^^^^^^^ is set, and completion is attempted again. Using patterns works not only for files but for all completions, such as options, user names, etc. I think the 3.1.6 behavior was introduced by Sven in zsh-workers/5871, and was briefly discussed at that time. Here's a case where it might differ a lot from the 3.0.6 behavior, and it sounds as if Will would prefer the old form -- in fact, he'd prefer that completion were not attempted again when no matches are found in the first place. You can certainly get this by some arrangement of the settings for the new function-based completion system, but I could understand the confusion if formerly zsh glob-completed file.11 and file.21 but now it glob-completes filefoo91blather as well. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com