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

Re: [ZSH] Question on filename completion



On Sun, 18 May 2008, Gowtham M wrote:

I noticed that zsh gets very slow/unresponsive when I try to
complete a file name which resides in the following file system
hierarchy:

/some/path/to/something/<folders>/xyz/<file to be completed>

The number of folders in <folders> is very high (of the order of
10 thousand). Let us assume they are numbered from 0 to 9999

When I hit tab at
zsh> ls /some/path/to/something/761/xyz/_  # Tab is hit when cursor is at _

zsh spends a lot of time in stat64()ing all the directories from
/some/path/to/something/0 to /some/path/to/something/9999

I do not understand why this is required to complete the filename
after /some/path/to/something/761/xyz


I've also noticed this in a different situation. When forced to use Windows, I run Zsh under Cygwin. Tab-completing any filenames under the /cygdrive directory always causes some kind of access to what would be the A: drive, a floppy disk drive on that particular machine.

e.g. /cygdrive/c/Documents\ and\ Settings/_ <Tab>
causes an attempted access of /cygdrive/a, which causes the drive to check for a floppy disk that's never there.

I don't have access to the machine right now, but my completion settings aren't too tweaked. (i.e. they're close to the defaults)

Best,
Ben


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