zsh-workers
 help / color / mirror / code / Atom feed
* need help with enhancement to prevent completion from stat'ing automounts
@ 2009-09-05 21:30 Greg Klanderman
  2009-09-08  2:14 ` Greg Klanderman
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Klanderman @ 2009-09-05 21:30 UTC (permalink / raw)
  To: Zsh list


Hi,

I am finally getting back to an issue I posted about back in January.
I am trying to use the fake-files zstyle to configure several hundred
automounts under /net and /home.  This mostly works, until zsh decides
to stat them all in order to decide which suffix to use for
completion.  What's happening is something like this:

1. _path_files calls compfiles passing in the fake-files zstyle data.
2. by the time compfiles returns, all memory of which values in the
   result were "fake" has been lost.
3. eventually _path_files calls compadd with the '-f' argument and the
   completions, meaning that compadd will stat all the values to
   figure out which are directories and which are files, in order to
   add the correct suffix.
4. compadd stats the fake automount points, causing the automounter to
   potentially mount hundreds of locations (already not good), and
   hang for a very long while timing out on a few tens that no longer
   exist that our ops department has not cleaned up.

I would like to create some configuration (via zstyle or whatever) to
prevent zsh from stat'ing these locations, and just assume they are
directories.  I was able to hard-code some logic in the ztat()
function in compresult.c which does exactly this for /net/* and
/home/*, and it works perfectly.

Now I just need some help to figure out what a reasonable way to
create a general configuration to support this would be.

thanks,
Greg


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-24 16:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-05 21:30 need help with enhancement to prevent completion from stat'ing automounts Greg Klanderman
2009-09-08  2:14 ` Greg Klanderman
2009-09-08 10:12   ` Peter Stephenson
2009-09-08 23:39     ` Greg Klanderman
2009-09-10  9:30       ` Peter Stephenson
2009-09-10 14:52         ` Greg Klanderman
2009-11-24 16:07           ` Greg Klanderman

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).