Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature-request] CLI completion for the commands #649

Closed
ericonr opened this issue Apr 10, 2020 · 5 comments · Fixed by #1509
Closed

[feature-request] CLI completion for the commands #649

ericonr opened this issue Apr 10, 2020 · 5 comments · Fixed by #1509
Labels
type: enhancement Proposed improvement

Comments

@ericonr
Copy link

ericonr commented Apr 10, 2020

It would be pretty cool if we could have tab auto-completion, similar to git's interface (as an example of something that has several subcommands). I would be interested in trying to start it at least for the Fish shell. This would probably only work for the Linux, *BSD and Mac environments, but I think it would make life much easier there.

Things to be supported:

  • Tab completion for commands like lib and core
  • Tab completion for the names of the options that can be passed, like --fqbn
  • Tab completion for the board names and options and for target names when installing cores, for example (possibly hard to implement, would require parsing some stuff as well)
@per1234 per1234 added the type: enhancement Proposed improvement label Apr 10, 2020
@ericonr
Copy link
Author

ericonr commented Jun 25, 2020

@umbynos thanks for the implementation! Anything else you want to track with this issue?

@umbynos
Copy link
Contributor

umbynos commented Jun 26, 2020

Hello @ericonr! Thanks for the feature request! Actually I added only a basic tab completion, it does not yet complete core names, libs, fqbn, because the team is doing a refactoring regarding fqbn here. I'll add the functionality in the near future. In the meanwhile please test the functionality and let us know! 😄

@ericonr
Copy link
Author

ericonr commented Sep 19, 2020

Sorry, I haven't had much time to use arduino-cli! From my quick testing, completion has been a great aid for usability, so thanks a lot!

I think the main usability concern for me regarding fqbn was in regards to finding out what options were available. Making those available both as completion and (ideally) some sort of help output would make arduino-cli an even more awesome tool.

@ubidefeo
Copy link

@ericonr
you're welcome, @umbynos did a great job on that :)
we'll look at fqbn completion in the near future, but for now if you need available options try the board details command

arduino-cli board details -b arduino:avr:nano

Option:                 Processor                                                                                   cpu
                        ATmega328P                                                   ✔                              cpu=atmega328
                        ATmega328P (Old Bootloader)                                                                 cpu=atmega328old
                        ATmega168                                                                                   cpu=atmega168

@per1234 per1234 reopened this Mar 30, 2021
@umbynos
Copy link
Contributor

umbynos commented Sep 29, 2021

Dynamic completion for --fqbn added here #1431
It's included in the latest release (0.19.2). @ericonr feel free to test it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants