zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: expand style `suffix' option
Date: Tue, 02 Oct 2001 12:41:21 +0100	[thread overview]
Message-ID: <22658.1002022881@csr.com> (raw)

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<TAB>
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 <pws@csr.com>                  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.
**********************************************************************


             reply	other threads:[~2001-10-02 11:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-02 11:41 Peter Stephenson [this message]
2001-10-02 14:52 ` Bart Schaefer
2001-10-04 13:10 ` Sven Wischnowsky
2001-10-04 13:33   ` Peter Stephenson
2001-10-05 11:17     ` Sven Wischnowsky
2001-10-05 16:10       ` PATCH: " Peter Stephenson
2001-10-08 12:33         ` Sven Wischnowsky
2001-10-09  9:48         ` Sven Wischnowsky
2001-10-09 10:35           ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22658.1002022881@csr.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).