Add /sbin to $PATH when invoking lspci and lsusb.

master
Ville Skyttä 2009-09-20 18:33:24 +03:00
parent f733e71e1f
commit aa45595251
2 changed files with 5 additions and 4 deletions

View File

@ -118,6 +118,7 @@ bash-completion (1.x)
rpmbuild -t*/--tarbuild completion.
* Don't hardcode path to lsmod.
* Fix sbcl file/dirname completion (Debian: #545743).
* Add /sbin to $PATH when invoking lspci and lsusb.
[ Todd Zullinger ]
* Make yum complete on filenames after install, deplist, update and upgrade

View File

@ -709,16 +709,16 @@ _count_args()
#
_pci_ids()
{
COMPREPLY=( ${COMPREPLY[@]:-} \
$( compgen -W "$( lspci -n | awk '{print $3}')" -- $cur ) )
COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W \
"$( PATH="$PATH:/sbin" lspci -n | awk '{print $3}')" -- $cur ) )
}
# This function completes on USB IDs
#
_usb_ids()
{
COMPREPLY=( ${COMPREPLY[@]:-} \
$( compgen -W "$( lsusb | awk '{print $6}')" -- $cur ) )
COMPREPLY=( ${COMPREPLY[@]:-} $( compgen -W \
"$( PATH="$PATH:/sbin" lsusb | awk '{print $6}' )" -- $cur ) )
}
# start of section containing completion functions for external programs