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

Conversation

@Aehmlo
Copy link

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Member

commented Jul 17, 2019

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

This comment has been minimized.

Copy link
Author

commented Jul 17, 2019

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

@Aehmlo Aehmlo force-pushed the Aehmlo:abbr branch from 452fd23 to 79eb3a3 Jul 17, 2019

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@phil-opp

This comment has been minimized.

Copy link
Member

commented Jul 17, 2019

Thanks a lot!

@phil-opp

This comment has been minimized.

Copy link
Member

commented Jul 17, 2019

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
Projects
None yet
2 participants
You can’t perform that action at this time.