Ok, this is a bug to monitor the status of completions of commands like emerge, equery etc. for the friendly interactive shell (fish). Once they're complete and working well, they may get turned into a package like gentoo-fishcomp, or something. The first attachment is my initial version of the emerge completion. It's very basic and doesn't locate and of the ebuild names, but has an almost complete list of all the flags...
Created attachment 74517 [details] Emerge.fish-0.0.1 Emerge.fish-0.0.1 Contains completions for the emerge command with all of the flags from man emerge coded in. Known bugs: * usepkg and usepkgonly don't have descriptions yet * There's some kind of a problem with comments or the function: complete: Too many arguments /etc/fish.d/completions/emerge.fish (line 1): function complete_ebuilds * The ebuilds aren't found by category or by package name or by specification.
Right, I figured out that first bug. It's because the place holder function I was using to list possible ebuild completions wasn't returning anything. Apparently it must return at least one non-whitespace result to avoid those completion errors. Also the -x (exclusive) switch doesn't work quite as you might think. It turns out that it's just a combination of -f and -r, meaning it isn't followed by a file and *is* followed by some other argument (meaning it gains an = sign after it, which is actually wrong). Some further work will be required to get things like "--help sync" working rather than "--help=sync". But that's enough for today...
Created attachment 74536 [details] Emerge.fish-0.0.2 Contains completions for the emerge command with all of the flags from man emerge coded in. Known bugs: * usepkg and usepkgonly don't have descriptions yet * The ebuilds aren't found by category or by package name or by specification.
The problem with 'complete -x' adding a '=' to switches is that some commands can't parse strings like '--help=sync' but can parse '--help sync', while other commands do exactly the opposite. Real GNU Getopt parsing allows both. You should file a bug with the emerge maintainers.
I'm closing this bug since the fish completions seem to have come on leaps and bounds. Please start a new bug if you feel the gentoo fish-completions are lacking...