Server IP : 51.89.169.208 / Your IP : 216.73.216.211 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/usr/share/zsh/5.5.1/functions/ |
Upload File : |
#compdef lsusb local usbidsline vendorid pair ret=1 local curcontext="$curcontext" state line expl typeset -A opt_args _arguments -C \ '(-v --verbose -t --tree)'{-v,--verbose}'[be verbose]' \ '-s+[filter devices by bus and/or device number]:bus and/or devnum to show' \ '-d+[filter devices by vendor/product ID]:vendor and product to show:->vendorproduct' \ '-D+[display only specified device]:device:_files -g "*(-%)" -P / -W /' \ '(-t --tree -v --verbose)'{-t,--tree}'[dump the physical USB device hierarchy as a tree]' \ '(-)'{-V,--version}'[print version information]' \ '(-)'{-h,--help}'[print help information]' && ret=0 if [[ -n $state && ${+_lsusb_vendors} -eq 0 ]]; then typeset -A _lsusb_vendors _lsusb_devices cat /usr/share/(misc|hwdata)/usb.ids | while IFS="" read usbidsline do case "$usbidsline" in ((#b)([0-9a-f]##) ##(*)) vendorid="$match[1]" _lsusb_vendors[$vendorid]="$match[2]" ;; ( (#b)([0-9a-f]##) ##(*))) pair="$vendorid:$match[1]" _lsusb_devices[${pair}]="$match[2]" ;; esac done fi _wanted products expl 'vendor ID:product ID' compadd -k _lsusb_devices && ret=0 return ret