The arduino-cli tool just got some new exciting features with the release of 0.11.0:
- Command-line completion
- External programmer support
- Internationalization and localization support (i18n)
Command-line completion
Finally, the autocompletion feature has landed!
With this functionality, the program automatically fills in partially typed commands by pressing the tab key. For example, with this update, you can type arduino-cli bo:
And, after pressing the <TAB> key, the command will auto-magically become:
There are a few steps to follow in order to make it work seamlessly. We have to generate the required file — to do so, we have added a new command named “completion.”
To generate the completion file, you can use:
By default, this command will print on the standard output (the shell window) the content of the completion file. To save to an actual file, use the “>” redirect symbol. Now you can move it to the required location (it depends on the shell you are using). Remember to open a new shell! Finally, you can press <TAB><TAB> to get the suggested command and flags.
In a future release, we will also be adding the completion for cores names, libraries, and boards.
Read more: The Arduino CLI just got some new exciting features