-
Notifications
You must be signed in to change notification settings - Fork 256
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 commands cookbook to cargo-shuttle --help #985
Conversation
This commit adds a couple of example `cookbook` style commands to the `--help` subcommand of `cargo-shuttle`. It took some time for me to realise the difference between `deploy` and `deployments`, or to discover that I could watch my logs in real time via `logs --follow`. My hope is that this extended help assists newcomers in figuring out what cargo-shuttle can do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @beyarkay, thanks for this! To me this feels a little bit redundant, but then again I am very familiar with the CLI 😄 We do have a page for the CLI in our docs, perhaps we should rather just add a link to that?
I agree that having cookbook examples in the help command is too much, but such a list of common ways to use commands are a good addition to the docs page. The link to the docs page can be included here. |
Ahh okay yeah this seems best. I'll ammend the PR to include a link to the docs page, and add a cookbook section to the docs. |
@beyarkay The comment you have now does not appear in the help output. The general description at the top of help page is taken from cargo-shuttle/Cargo.toml. |
Ahh this was a sneaky line to find. #[derive(Parser)]
#[command(
version,
- about,
// Cargo passes in the subcommand name to the invoked executable. Use a
// hidden, optional positional argument to deal with it.
arg(clap::Arg::new("dummy")
.value_parser([PossibleValue::new("shuttle")])
.required(false)
.hide(true))
)]
pub struct Args {
#[command(flatten)]
pub project_args: ProjectArgs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! thanks 👍
This commit adds a couple of example
cookbook
style commands to the--help
subcommand ofcargo-shuttle
.Description of change
It took some time for me to realise the difference between
deploy
anddeployments
, or to discover that I could watch my logs in real time vialogs --follow
. My hope is that this extended help assists newcomers in figuring out what cargo-shuttle can do.As a side note, I understand that this adds a bit of bloat to the help command, and maybe this sort of information is better off somewhere in the docs or in the descriptions for each of the subcommands, so feel free to close this PR if it does not fit in with the overall goals of where information should be.