Closed dardo82 closed 9 years ago
Looks well. I'll check it with a linux device and let you know.
It's more congruent internally with this change, even if maybe it's slightly different from the Linux version.
How long will it take to let me know? -_-
Sorry, totally forgot about this.
I think it needs a lot of rework to be merged. Once again, the spirit of this command is to emulate it as close as possible to the Linux one, but for OS X. Why is this? Some programs or scripts that were ported from Linux to OS X need the exact same behavior.
So:
lsusb -h
are now printed in different order. -m
should be just above --version
Spelling corrections in lsusb -h
don't apply, they're actually that way in Linux. As a reference:
Usage: lsusb [options]...
List USB devices
-v, --verbose
Increase verbosity (show descriptors)
-s [[bus]:][devnum]
Show only devices with specified device and/or
bus numbers (in decimal)
-d vendor:[product]
Show only devices with the specified vendor and
product ID numbers (in hexadecimal)
-D device
Selects which device lsusb will examine
-t
Dump the physical USB device hierarchy as a tree
-V, --version
Show version of program
-s
is not an error, current behavior works as expectedIf you want to review these and submit a new PR I'd gladly take a look again. This time won't take long, I promise :)
Can you also give me the output of lsusb
on a Linux system as opposed to lsusb -h
for reference ?
On linux:
$ lsusb -h
lsusb: invalid option -- 'h'
Usage: lsusb [options]...
List USB devices
-v, --verbose
Increase verbosity (show descriptors)
-s [[bus]:][devnum]
Show only devices with specified device and/or
bus numbers (in decimal)
-d vendor:[product]
Show only devices with the specified vendor and
product ID numbers (in hexadecimal)
-D device
Selects which device lsusb will examine
-t
Dump the physical USB device hierarchy as a tree
-V, --version
Show version of program
$ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
I don't have any script or program that needs this, i was doing this just for fun, but if i'm so limited in the ways i can improve it, i think that i will just alias system_profiler SPUSBDataType to lsusb
and that will suit my tastes, at least for now.
Add manufacturer's name to the "tree" option, optionally using parenthesis.