mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 23:47:25 +00:00
新文件: share/completions/lsusb.fish
新文件: share/functions/__fish_complete_usb.fish
This commit is contained in:
parent
71f6986dd6
commit
129d2f803a
2 changed files with 10 additions and 0 deletions
7
share/completions/lsusb.fish
Normal file
7
share/completions/lsusb.fish
Normal 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"
|
3
share/functions/__fish_complete_usb.fish
Normal file
3
share/functions/__fish_complete_usb.fish
Normal file
|
@ -0,0 +1,3 @@
|
|||
function __fish_complete_usb
|
||||
lsusb | awk '{print $2 ":" $4}'| cut -c1-7
|
||||
end
|
Loading…
Reference in a new issue