On 9/16/06, Martin Bähr <[EMAIL PROTECTED]> wrote:
> On Sat, Sep 16, 2006 at 10:17:50AM +0200, Axel Liljencrantz wrote:
> > Unfortunatly, __fish_describe_command does not always return things in
> > alphabetical order, thoiugh it does so _most_ of the time. Apropos
> > entries may look like:
> > foo, bar, baz         (1) -  meaningless junk command
>
> i can not see that behaviour on ubuntu.
> and i'd be willing to miss the description of one command or two
> if it means not missing all of them.

It seems to vary from platform to platform how common this is. Fish
used to directly grep the whatis database as a textfile, since this
worked on my Fedora box. The speed was excellent, even on the slowest
of systems, since I could use regexps to only return what was really
needed. Unfortunatly this doesn't work on Debian derivatives, since
they use multiple databases and a different format. I seem to remember
that the grouping I described in my previous mail is rather common on
OS X and possibly also the BSDs. In fedora you can use regexes in
apropos, but unfortunatly most other systems don't allow this. In
summary, using apropos or whatis in a script is a quagmire, and
changes to the __fish_describe_command should be done with extreme
care.

It would be possible to assume that apropos output is presorted and
without multiple keys on a single ine on Linux systems, it _might_
help performance enough that one could enable comamnd description
lookup on all commands. You are welcome to rewrite the
__fish_describe_command function to take advantage of apropos output
being sorted on Linux systems, it's not hard to use different
definitions for a function depending on system in fish. Patches are
welcome...

>
> > so if you want information on the bar command, it is not enough to
> > search through the list for bar. If that was the case,
> > __fish_describe_command could perform a search instead of a filter,
> > and would be a great deal faster. :(
>
> i'd prefer to optimize for speed and not accuracy on this one.
>
> greetings, martin.
> --
> cooperative communication with sTeam      -     caudium, pike, roxen and unix
> offering: programming, training and administration   -  anywhere in the world
> --
> pike programmer   travelling and working in europe             open-steam.org
> unix system-      bahai.or.at                        iaeste.(tuwien.ac|or).at
> administrator     (caudium|gotpike).org                          is.schon.org
> Martin Bähr       http://www.iaeste.or.at/~mbaehr/
>


-- 
Axel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to