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

Add xb, xt, xc, and xr subcommands #42

Merged
merged 1 commit into from
Jul 17, 2019
Merged

Conversation

Aehmlo
Copy link

@Aehmlo Aehmlo commented Jul 16, 2019

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.

@Aehmlo
Copy link
Author

Aehmlo commented Jul 16, 2019

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.

@phil-opp
Copy link
Member

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.

@Aehmlo
Copy link
Author

Aehmlo commented Jul 17, 2019

Good idea, I'll rework it to do that instead.

@phil-opp phil-opp merged commit 9c9aca9 into rust-osdev:master Jul 17, 2019
@phil-opp
Copy link
Member

Thanks a lot!

@phil-opp
Copy link
Member

Published as version 0.5.15.

phil-opp added a commit that referenced this pull request Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xc, xb, xr, xt
2 participants