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

Re: completion through windows drive letters



On Sun, 2 Aug 2009 16:20:03 -0400
Anthony Heading <ajrh@xxxxxxxx> wrote:
> Using zsh on cygwin with old-style completion, "cd c:/P<TAB>" will
> complete e.g. to c:/Program Files et al.  Using the compinit system,
> this no longer works for me.  Is there any setting that I might be
> missing, or maybe a way of setting simpler completion as a fallback?

You can make completion after c:/ work with

  zstyle ':completion:*' accept-exact-dirs true

This has the side effect (which, if you have slow network file access from
Cygwin as I do, is a major usability enhancement) that you don't get
partial-path completion of existing directories, i.e. in
/foo/bar/stuff<TAB> if "foo" and "bar" exist it won't try to look for foo*
and bar*, which is what completion does by default.  Actually, that's the
main effect; the side effect is that if c: exists the shell won't do
anything clever (i.e. stupid) with it.

This is a workaround---I don't know what the underlying difference is and
_path_files and its utilities are a disaster area.  Changing it always
somehow seems to make it more rather than less obscure no matter how much
time you spend on getting it right (and I for one have spent days of my
life).

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


'member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom'



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