On Jan 16, 2008 11:21 AM, Diggory Hardy <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Here's a few git completions (probably only a very small set of available git
> commands). But after adding them, I noticed that using tab-completion
> on 'git-' (possible since git commands are also available using hard-linked
> binaries 'git-*') not only lists all available commands, but their
> descriptions too (not ones I added) --- where has fish got their descriptions
> from? They're not in /usr/share/fish/completions or any other completion dir.
>
> Not that it's particularly important, but I'm intrigued and it could provide
> an easy way to add full tab-completion with descriptions.
>

Fish calls an internal shellscript function called
__fish_describe_command in order to find a description for a command.
Actually, it finds descriptions for all commands beginning with a
specified prefix, so if you call '__fish_describe_command git' you
will get a list of descriptions for all git subcommands.

What __fish_describe_command actually does is that it uses the apropos
command to search the whatis database (which in turn is generated by
from the manual pages installed in the system). Unfortunatly, the
definition of the __fish_describe_command is a bit of an abomination,
because the actual format of the apropos output varies significantly
between platforms and even between Linux distributions.

Hope that answers you question, and that you'll be sending us a patch
containing lots of git tab completions soon!


Axel

> Diggory
>
> -------------------------------------------------------------------------
> 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
>
>

-------------------------------------------------------------------------
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