I've attached a copy of the patch in addition to copying it out below.

On Gentoo the eix program is MUCH faster than emerge for listing package
names.  I've left the emerge code in as a 2nd choice because not every
Gentoo system has eix installed (although they should).  Also, the
emerge code didn't seem to produce any output on my system.

Peace, James


--- functions/__fish_print_packages.fish.orig   2010-11-27 03:30:42.000000000 
-0700
+++ functions/__fish_print_packages.fish        2010-11-27 03:45:35.000000000 
-0700
@@ -46,9 +46,17 @@
        # This completes the package name from the portage tree. 
        # True for installing new packages. Function for printing 
        # installed on the system packages is in completions/emerge.fish
-       if type -f emerge >/dev/null
-               emerge -s \^(commandline -tc) |sgrep "^*" |cut -d\  -f3 |cut 
-d/ -f2
+
+       # eix is MUCH faster than emerge so use it if it is available
+       if type -f eix > /dev/null
+               eix --only-names "^"(commandline -tc) | cut -d/ -f2
                return
+       else
+               # FIXME?  Seems to be broken
+               if type -f emerge >/dev/null
+                       emerge -s \^(commandline -tc) |sgrep "^*" |cut -d\  -f3 
|cut -d/ -f2
+                       return
+               end
        end
 
 end
--- functions/__fish_print_packages.fish.orig	2010-11-27 03:30:42.000000000 -0700
+++ functions/__fish_print_packages.fish	2010-11-27 03:45:35.000000000 -0700
@@ -46,9 +46,17 @@
 	# This completes the package name from the portage tree. 
 	# True for installing new packages. Function for printing 
 	# installed on the system packages is in completions/emerge.fish
-	if type -f emerge >/dev/null
-		emerge -s \^(commandline -tc) |sgrep "^*" |cut -d\  -f3 |cut -d/ -f2
+
+	# eix is MUCH faster than emerge so use it if it is available
+	if type -f eix > /dev/null
+		eix --only-names "^"(commandline -tc) | cut -d/ -f2
 		return
+	else
+		# FIXME?  Seems to be broken
+		if type -f emerge >/dev/null
+			emerge -s \^(commandline -tc) |sgrep "^*" |cut -d\  -f3 |cut -d/ -f2
+			return
+		end
 	end
 
 end
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to