Description
Describe the problem you are trying to solve
I am trying to create an alias for cargo-generate.
The crate cargo-generate
is automatically used when executing cargo generate
.
With the help of structopt
, we created an alias called gen
to execute cargo-generate
using cargo run -- gen
instead of cargo run -- generate
.
After installing the crate locally (cargo install --path .
), the current way to execute cargo generate
is to let cargo
make an invocation of an external tool cargo-${command}
, so cargo gen
is an unknown command to cargo
.
Describe the solution you'd like
A solution to create aliases is to generate a file called config
inside $HOME/.cargo
, and fill it with an alias, like this:
[alias]
gen = "generate"
but this method needs a manual intervention from the user.
I would like to know if it exists an "automated" way to create this alias easily after installing the crate on a system, or not.
Notes
Original issue, posted in cargo-generate, here.
Thanks a lot!