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

Still bugs completing .files; _multi_parts



Firstly, I did

% less ~/.<TAB>

and got a list of files not beginning with a dot amongst those which did.


Secondly and unrelatedly, I was trying out _multi_parts for the user guide
and did (you can see where this is coming from):

_foo () {
  local groups
  groups=(news.announce.newuser
          news.groups.questions
          gnu.emacs.gnus
          comp.unix.shell
          rec.arts.sf.written
          freeserve.test) 
  _multi_parts . groups
}
compdef _foo foo

Hitting ^D, everything was fine: I get the list
  comp.        freeserve.   gnu.         news.        rec.       
as expected.  Now hitting tab, which causes menu completion and menu
selection to start up, things start to go wrong.  First, the list is
expanded to show both `news.', instead of pruning the duplicate.  Second,
the value inserted is the full whack, e.g. `comp.unix.shell'; I can't
simply cycle through the top level and select the next one down.  I'm
puzzled about this because as far as I can see the only existing call to
_multi_parts in _tar works just the same way, except with / as the
separator.  The clue seems to be that if I go straight into completion
without doing ^D things work as expected (except that I don't see a final
`.' if the part isn't the final one, as I would expect to do in the tar
case).

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>



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