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

Re: PATCH: _pon, poff



=?UTF-8?Q?J=C3=B6rg?= Sommer wrote:
> Hello Clint,
> 
> Clint Adams <clint@xxxxxxx> wrote:
> >    '(-q --quick)'{-q,--quick}'[hangs up after all ip-up scripts are run]' \
> > -  '1:provider to call:(${provider[@]})'
> > +  '1:provider to call:_files -W /etc/ppp/peers'
> 
> Only for my understanding: Why you can use _files here? Doesn't this tag
> the completions as files even though they are hosts? Does this cause any
> problems?

The basic behaviour of _files is just to add the filenames as strings.
There is additional behaviour (showing types, etc.), but it relies on
being able to find the file added.  If the completion system doesn't
find the file it will just fall back to treating it like an ordinary
string.  In this case, it actually will find the file; but all that's
likely to happen is a few extra things show up.  The most distracting
possibility is if you're using the file-list style I added.  Then you
might see long listings of the file in that directory.  Outside listings,
however, you shouldn't see any problems.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



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