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

Disabling partial path completion and cygdrive completion unhappiness



I want to disable partial path completion in all cases.  The most
troubling issue I have with it is using zsh under Cygwin.  The
/cygdrive root path is virtual and beneath it has directory entries for
each of the available drives in the system.  I have an aged and slow
floppy, two hard drives, a CD burner, and a tape drive.  So the usual
state of things is like this:

# ls /cygdrive
c  d  v

(the floppy (a) will only appear if a disk is in the drive, same with
the CD (e) ).

The problem is that anytime cygdrive is traversed/globbed/etc., the
_empty_ floppy drive is accessed and it takes a good 2 or 3 seconds
before the contents of cygdrive are presented.

You can imagine my annoyance when I have to complete a path from
/cygdrive/c that is several levels deep, hitting TAB at each level.

Perhaps this emphasizes a weakness of how cygdrive is implemented
within Cygwin.  Nonetheless, I have been able to work around the
problem by mounting my most frequently used drives off of / .  Then,
cygdrive doesn't have to be queried at all, and I can easily type
/c/<TAB> and complete as usual.

I also have

zstyle ':completion:*' fake-files /:cygdrive '/cygdrive:a c d e v'

in my .compinstall since I only occasionally access some drives and
therefore don't have a mount point for them off my root directory (or I
can't mount them until a disk is present in the drive).  Unortunately,
the fake-files style overrides completion via the _path_files (I guess)
mechanism that would complete across my mount point for /c, so with the
above zstyle, all completions via /c cause my floppy drive to be
laboriously and annoyingly active until I'm done completing.

Is there a better way to set this up?  Plus, I really would like to
know how to disable partial path completion (if I type /e/<TAB> and my
CD drive hasn't settled with its new disk yet, I often get /etc
instead).

Thanks for any insights.

-- 
Shawn Halpenny

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com



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