As a convenience to end users having mbed ls alias to mbedls would be very nice and improve the usability of the tool.
We already have mbedls -command
@teetak01 i'm aware of the mbed-ls utility, i'm saying we should alias a command in mbed-cli to use it.
@BlackstoneEngineering , I was just wondering which commands you are referring, as mbed ls in context of mbed-cli will print out the modules in the current build, while mbedls from, mbed-ls module will display the available K64F's. Either way if you want to make an alias, would it not cause conflict between the seperate modules?
I just thought you were meaning a direct alias of mbed ls -> mbedls. That is quite fine. Although I think we could just add a mention in README to use mbedls to show which devices are available (as long as the module is installed).
@teetak01 , ah, i was not aware that there was already a ls command pre-existing in the mbed-cli command. I would like to add some command, a keyword that makes sense, to the mbed-cli tool that calls mbedls.
This is an interesting situation, the commands mbed ls and mbedls do two totally separate things :).
With regards to adding an alias to the mbedls module in mbed-cli, I think this makes sense. That way we tell the users to just install the mbed-cli tool and it pulls in our entire suite of tools under-the-hood.
Since mbed ls is already a valid command, I think we need to pick a different one. Something like mbed detect?
What about mbed devices ?
What about mbed devices ?
I thought about that too, though I was pretty conscious of the fact that our terminology when it comes to "targets", "platforms", "devices", etc starts to get pretty confusing after a while.
So I was trying to stay away from adding mbed devices, especially since we already have mbed targets.
Plus mbed detect kind of goes along nicely with the other "verbs" that are already commands. Just my 2 cents!
@sg- @bogdanm @0xc0170 @mjs-arm @PrzemekWirkus Any thoughts?
I vote for mbed detect, its not terrible and thus its ok by me.
Please remember that mbed-ls is available also as importable Python module so you can just use its API to implement your own human facing list of devices, no need to call directly mbed-ls (mbedls CLI)
>>> import mbed_lstools
>>> mbeds = mbed_lstools.create()
>>> mbeds
<mbed_lstools.lstools_win7.MbedLsToolsWin7 instance at 0x02F542B0>
>>> mbeds.list_mbeds()
[{'platform_name': 'K64F', 'mount_point': 'E:', 'target_id': '02400203D94B0E7724B7F3CF', 'serial_port': u'COM61'}]
Names are important for sure. if you introduce mbed-ls to your code you can also take advantage of detection feature and combine it with compile switch. Just like for singletest.py switch --auto works.
Added mbed detect. Can you try latest version? 0.5.2
cc @BlackstoneEngineering
Now implemented
Most helpful comment
I vote for
mbed detect, its not terrible and thus its ok by me.