新文件: share/completions/lsusb.fish

新文件:    share/functions/__fish_complete_usb.fish
This commit is contained in:
leafonsword 2014-01-12 11:59:46 +08:00 committed by Konrad Borowski
parent 71f6986dd6
commit 129d2f803a
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,7 @@
complete -c lsusb -s v -l verbose --description "Increase verbosity (show descriptors)"
complete -x -c lsusb -s s -a '(__fish_complete_usb)' --description "Show only devices with specified device and/or bus numbers (in decimal)"
complete -c lsusb -s d --description "Show only devices with the specified vendor and product ID numbers (in hexadecimal)"
complete -c lsusb -s D -l device --description "Selects which device lsusb will examine"
complete -c lsusb -s t -l tree --description "Dump the physical USB device hierarchy as a tree"
complete -c lsusb -s V -l version --description "Show version of program"
complete -c lsusb -s h -l help --description "Show usage and help"

View file

@ -0,0 +1,3 @@
function __fish_complete_usb
lsusb | awk '{print $2 ":" $4}'| cut -c1-7
end