zsh-workers
 help / color / mirror / code / Atom feed
* expand style `suffix' option
@ 2001-10-02 11:41 Peter Stephenson
  2001-10-02 14:52 ` Bart Schaefer
  2001-10-04 13:10 ` Sven Wischnowsky
  0 siblings, 2 replies; 9+ messages in thread
From: Peter Stephenson @ 2001-10-02 11:41 UTC (permalink / raw)
  To: Zsh hackers list

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.
**********************************************************************


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-10-09 10:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-02 11:41 expand style `suffix' option Peter Stephenson
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

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).