Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

expand style `suffix' option

I've been meaning to try to get this to work for some time.  Have I

          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
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@xxxxxxx>                  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 
If you received this in error, please contact the sender and 
delete the material from any computer.

Messages sorted by: Reverse Date, Date, Thread, Author