From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14680 invoked from network); 2 Oct 2001 11:42:02 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Oct 2001 11:42:02 -0000 Received: (qmail 24437 invoked by alias); 2 Oct 2001 11:41:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15922 Received: (qmail 24421 invoked from network); 2 Oct 2001 11:41:53 -0000 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: expand style `suffix' option Date: Tue, 02 Oct 2001 12:41:21 +0100 Message-ID: <22658.1002022881@csr.com> From: Peter Stephenson I've been meaning to try to get this to work for some time. Have I misunderstood? expand This style is used when completing strings consisting of multiple parts, such as path names. If its value contains the string `prefix', the partially typed word from the line will be expanded as far as possible even if trailing parts cannot be completed. If it contains the string `suffix' and normal (non-menu-) completion is used, matching names for components after the first ambiguous one will also be added. This means that the resulting string is the longest unambiguous string pos- sible, but if menu completion is started on the list of matches generated this way (e.g. due to the option AUTO_MENU being set), this will also cycle through the names of the files in pathname components after the first ambiguous one. First off, I assumed I could do zstyle ':completion:*' expand 'prefix suffix' but a look at the code reveals this has to be zstyle ':completion:*' expand prefix suffix so `contains the string' could be made a little clearer. When it does seem to be on, I would expect ~/b/b to list or cycle through all files ~/b*/b* when menu completion is in use, but it doesn't. Is this assumption wrong? The manual entry doesn't actually say what happens when you have menu completion on from the start, as opposed to started automatically, but I turned it off and still only get the first subdirectory completed when automenu is activated. If this isn't what it does, what does it do? Or does it conflict with some other style or option? But I get the same behaviour with zsh -f. I was looking at adding the `expand' style to compinstall, but I'd like to find out what it does first. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************