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

Re: completing automounts with fake-files setting hangs zsh



Back in August, 2007, I wrote:
: Really this whole idea of attempting to complete things that don't
: exist yet puts a huge amount of overhead on the cases where nothing
: ever will.

Now, I get to say, "Here we go again."

On Jan 24,  5:47pm, Greg Klanderman wrote:
} 
} Is the proper way to configure completion of automounts by using the
} fake-files style setting?

On Jan 24, 10:45pm, Greg Klanderman wrote:
} 
} Further investigation seems to indicate that the problem lies in it
} stat'ing all those "fake" files, and some of those stats are taking a
} very long time.  Is there some way to have it not do that?

I don't know the specific method you're using to populate fake-files,
but my suggested approach is to use "zstyle -e" to filter the value
before returning it to the completion system.  Remember completion is
designed so that the shell functions typically collect all potential
matches for a given situation and then leave it up to the internals
to filter them against the command line.

So if you are able to push some of that filtering into the functions
by use of hooks like "zstyle -e", you can optimize much better than
the generic internal filters are able.



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