This hasn't been implemented in the CLI commands.
Using the latest code (not the binaries in the files section), it is possible to do from lua. The cli stores it connection in a global called 'con'. You are free to create other connections.
See cli.lua and chdku.lua for details. This isn't really finished, both the C API and lua libraries are subject to change.
If you want to connect the cli commands to a particular camera, you can just use con:connect(<camera>) where <camera> is obtained from the camera list as shown in the example below.
Here's an example. Note that the returns in ! commands are just to print out the values.
$ ./chdkptp -i
___> !devs=chdk.list_devices();return devs
={
[1]={
dev="\\\\.\\libusb0-0001--0x04a9-0x311b",
bus="bus-0",
vendor_id=1193,
model="Canon PowerShot A540",
product_id=12571,
},
[2]={
dev="\\\\.\\libusb0-0002--0x04a9-0x31bc",
bus="bus-0",
vendor_id=1193,
model="Canon PowerShot D10",
product_id=12732,
},
}
___> !a540=chdku.connection()
___> !return a540:connect(devs[1])
=true
___> !d10=chdku.connection()
___> !return d10:connect(devs[2])
=true
___> !return a540:execwait('return get_buildinfo()')
=true,{
platsub="100b",
platform="a540",
version="CHDK",
platformid=12571,
build_number="0.9.9",
build_date="Aug 28 2011",
os="vxworks",
build_time="22:12:55",
}
___> !return d10:execwait('return get_buildinfo()')
=true,{
platsub="100a",
platform="d10",
version="CHDK",
platformid=12732,
build_number="0.9.9",
build_date="Sep 5 2011",
os="dryos",
build_time="16:45:05",
}
___>