Closed Aehmlo closed 5 years ago
One downside to this implementation is that, if the command is invoked directly (path/to/cargo-xr
), the error message will suggest the full subcommand (cargo xrun
) instead of the short version (cargo xr
). However, I think this is pretty much a nonissue.
Thanks for the pull request!
I think we can avoid the issue you mentioned by just calling xargo_lib::main_common("b")
etc. and letting cargo do the de-aliasing. This way, the changes in src/cli.rs
wouldn't be needed either.
Good idea, I'll rework it to do that instead.
Thanks a lot!
Published as version 0.5.15.
I've added these as separate binaries, since it requires the least amount of configuration and retains the ease of adding new subcommands. I had to change the "check if this was invoked as a cargo subcommand" logic a little to make it actually work when invoked as e.g.
cargo xc
.Closes #41.