On Jan 23, 2008 9:40 AM, Axel Liljencrantz <[EMAIL PROTECTED]> wrote:
> Unfortunatly, that depends heavily on the apropos implementation. Some
> apropos implementations are simply a wrapper shellscript around grep
> while others are perform a search on multiple binary database files. I
> added that specific limitation because doing lookup on a single
> character took much too long on some systems, though I don't remember
> which ones. One could do some kind of performance test the first time
> the completions are used, and store the result in a universal
> variable, I guess...

I think it's a useful UI feature for discoverability. And not
displaying command descriptions for short completion inputs is
definitely unexpected behaviour. I suppose responsiveness would trump
that on slow systems...

Are we sure that the problem's apropos implementation? Some quick and
dirty "profiling" with time on my 600 MHz box (which uses binary
databases, so it's not a poor implementation, but it is a slow
machine) shows that the difference between 'a' (with 5304 apropos
records) and 'z' (with 245) is about 0.25 seconds. 'a' takes 0.51
elapsed, 'z' takes 0.27 elapsed. A bit more tinkering with
gettimeofday shows that the processing of the __fish_describe_command
results is negligible, and the user-observed time for the overall
description operation without the filter is about 1 to 1.5 seconds.
With the filter, it's practically instantaneous.

If it really is poor apropos implementations on slow systems causing
the problem, I think your solution's a good one, and it can be
implemented easily enough. We can do it entirely in
__fish_describe_command, and even put in a flag to let the user
override the auto-detection. But I'd be in favour of removing the
minimum length check and seeing who complains, then getting them to
help us figure out the problem. ;)

-- 
-Nick Pilon

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to