zsh-workers
 help / color / mirror / code / Atom feed
From: Greg Klanderman <gak@klanderman.net>
To: Zsh list <zsh-workers@sunsite.dk>
Subject: need help with enhancement to prevent completion from stat'ing automounts
Date: Sat, 5 Sep 2009 17:30:29 -0400	[thread overview]
Message-ID: <19106.55413.238410.101865@gargle.gargle.HOWL> (raw)


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


             reply	other threads:[~2009-09-05 21:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-05 21:30 Greg Klanderman [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19106.55413.238410.101865@gargle.gargle.HOWL \
    --to=gak@klanderman.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).