On 26/05/21 7:39 pm, Jean Delvare wrote: > Hi Chris, > > On Tue, 25 May 2021 21:06:12 +1200, Chris Packham wrote: >> File based tab completion means it's easy to do something like >> i2cdump /dev/i2c-0 0x52. Accept this method of specifying the i2c bus >> device. > I can't really see the value of this change, sorry. You want to use a > longer parameter so you can tab-complete it. The original parameter was > a 1- or 2-digit number, which is faster to type than /d<tab>i2<tab>. > Plus if you have multiple i2c buses, tab completion can't guess which > one you want anyway, so you'll have to type the bus number eventually. > > So, what do we actually win here? My main motivation was to replace an in-house tool that is provides similar functionality but it currently takes the bus as a path. At first I even thought there was a bug because I thought "or an I2C bus name" meant the path, it wasn't until I looked at the code that I realised this was the name used in the kernel. One advantage I can see is that the /d<tab>/i2<tab> implicitly validates that the bus actually exists (assuming /dev is managed by devtmpfs and/or udev).