mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-01 15:31:12 +08:00
新文件: share/completions/lsusb.fish
新文件: share/functions/__fish_complete_usb.fish
This commit is contained in:
parent
71f6986dd6
commit
129d2f803a
share
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…
x
Reference in New Issue
Block a user