#workflow #automation #maintained #rust-lang #ready-for-use

build dev_bestia_cargo_completion

Auto-completion for cargo-auto and automation_tasks_rs and partial auto-completion for cargo in bash

5 stable releases

new 2024.421.1905 Apr 21, 2024
2024.307.1911 Mar 7, 2024
2023.531.1119 May 31, 2023
2021.1230.1047 Dec 30, 2021
2021.819.909 Aug 19, 2021

#219 in Build Utils

Download history 7/week @ 2024-02-18 7/week @ 2024-02-25 398/week @ 2024-03-03 55/week @ 2024-03-10 1/week @ 2024-03-17 69/week @ 2024-03-31

75 downloads per month

MIT license

26KB
61 lines

dev_bestia_cargo_completion

Auto-completion for cargo-auto and automation_tasks_rs and partial auto-completion for cargo in bash
version: 2024.421.1905 date: 2024-04-21 author: bestia.dev repository: GitHub

maintained ready-for-use rustlang automation workflow

logo dev_bestia_cargo_completion is part of the automation_tasks_rs project

crates.io Documentation crev reviews Lib.rs
Licence Rust Newest docs dev_bestia_cargo_completion

Lines in Rust code Lines in Doc comments Lines in Comments Lines in examples Lines in tests

Hashtags: #maintained #ready-for-use #rustlang #automation #workflow
My projects on GitHub are more like a tutorial than a finished product: bestia-dev tutorials.
I recommend using the CRUSTDE - Containerized Rust Development Environment to write Rust projects on Linux, isolated from your system.

Try it

Install the binary:

cargo install dev_bestia_cargo_completion

Save definition for auto_completion in bash:

complete -C "dev_bestia_cargo_completion" cargo

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 the ~/.bashrc file.

# list the definitions
complete
# delete a definition
complete -r cargo
# define a binary to auto-complete the command
complete -C "binary" command
# for example
complete -C "dev_bestia_cargo_completion" cargo

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

No runtime deps