dev_bestia_cargo_completion
Auto-completion for cargo-auto and automation_tasks_rs and partial auto-completion for cargo in bash
version: 2024.306.2322 date: 2024-03-06 author: bestia.dev repository: GitHub
dev_bestia_cargo_completion is part of automation_tasks_rs project
Hashtags: #rustlang #buildtool #developmenttool
My projects on GitHub are more like a tutorial than a finished product: bestia-dev tutorials.
Try it
Install the binary:
Save definition for auto_completion in bash:
Start typing cargo b
and press tab
.
It should auto-complete to cargo build
.
Congratulation! You just used auto-completion :-)
bash auto completion
Auto-completion in Debian bash is a great tool. You type the first letters, press tab and the word is auto-completed.
Bash can call an executable binary to return the available words. So it can be written in Rust. This can produce even better results as known as dynamic auto-completion
.
For my knowledge cargo
does not have auto-completion yet. There are many plans. It can take some time.
I will build what I need now. Something simple. It doesn't need to be perfect.
This is a great blog:
https://www.joshmcguigan.com/blog/shell-completions-pure-rust/
complete, the Linux command
The Linux command complete
adds auto_completion definitions to bash.
But it is only for the current session. If you want to make it persistent add it to you ~/.bashrc
file. Or to some other file that runs commands on initialization of the bash.
# list the definitions
# delete a definition
# define a binary to auto-complete the command
# for example
Development details
Read the development details in a separate md file:
DEVELOPMENT.md
Releases changelog
Read the changelog in a separate md file:
RELEASES.md
TODO
Nothing big in the near future.
Open-source and free as a beer
My open-source projects are free as a beer (MIT license).
I just love programming.
But I need also to drink. If you find my projects and tutorials helpful, please buy me a beer by donating to my PayPal.
You know the price of a beer in your local bar ;-)
So I can drink a free beer for your health :-)
Na zdravje! Alla salute! Prost! Nazdravlje! 🍻
//bestia.dev
//github.com/bestia-dev
//bestiadev.substack.com
//youtube.com/@bestia-dev-tutorials