Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 2e3acf97b6e69efb5b02391cf9118779 > files > 1

bash-completion-20060301-18mdv2008.0.src.rpm

--- /etc/bash_completion	2005-04-01 13:32:56.000000000 +0200
+++ bash_completion	2005-05-08 15:41:34.000000000 +0200
@@ -360,6 +360,22 @@
 			sed -ne 's/^\('$cur'.*\)\.k\?o\(\|.gz\)$/\1/p') )
 }
 
+# This function complete on PCI IDs
+#
+_pci_ids()
+{
+	COMPREPLY=( ${COMPREPLY[@]:-} \
+		$( compgen -W "$( lspci -n | awk '{print $4}')" -- $cur ) )
+}
+
+# This function complete on USB IDs
+#
+_usb_ids()
+{
+	COMPREPLY=( ${COMPREPLY[@]:-} \
+		$( compgen -W "$( lsusb | awk '{print $6}')" -- $cur ) )
+}
+
 # start of section containing completion functions for bash built-ins
 
 # bash alias completion