Skip to content

Commit

Permalink
feat(snot-cli): more clap coolness
Browse files Browse the repository at this point in the history
  • Loading branch information
gluax committed Mar 30, 2024
1 parent 369bdf5 commit 64c6128
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/snot-cli/src/commands/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@ pub struct Env {
#[derive(Debug, Parser)]
enum Commands {
/// Prepare a (test) environment.
#[command(arg_required_else_help = true)]
Prepare {
/// The test spec file.
#[clap(value_hint = ValueHint::AnyPath)]
spec: PathBuf,
},

/// Start an environment's timeline (a test).
#[command(arg_required_else_help = true)]
Start {
/// Start a specific env.
#[clap(value_hint = ValueHint::Other)]
id: usize,
},

/// Stop an environment's timeline.
#[command(arg_required_else_help = true)]
Stop {
/// Stop a specific env.
#[clap(value_hint = ValueHint::Other)]
Expand Down
1 change: 1 addition & 0 deletions crates/snot-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ mod env;
#[derive(Debug, Parser)]
pub enum Commands {
/// Generate shell completions.
#[command(arg_required_else_help = true)]
Autocomplete {
/// Which shell you want to generate completions for.
shell: clap_complete::Shell,
Expand Down

0 comments on commit 64c6128

Please sign in to comment.