Skip to content

Commit

Permalink
Document command line options
Browse files Browse the repository at this point in the history
  • Loading branch information
tstat committed Jul 26, 2024
1 parent 84968ec commit 3e12061
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/src/cli/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,28 @@ use clap::Parser;
use std::path::PathBuf;

#[derive(Parser, Debug)]
#[command(version, about)]
pub struct Args {
/// The directory to initialize a db cluster in
pub directory: PathBuf,
/// Run postgres in an existing db cluster
#[arg(long)]
pub use_existing_dir: bool,
/// Localhost port to listen on
#[arg(short, long)]
pub port: Option<u16>,
/// Control if the directory is deleted when tmp-postgres ends
#[arg(long = "remove")]
pub should_remove: Option<bool>,
/// Start a psql session
#[arg(long)]
pub psql: bool,
/// Silences stdout/stderr forwarding from initdb and postgres
#[arg(long)]
pub silent: bool,
/// Optional command to run when tmp-postgres is ready to receive
/// connections, when specified tmp-postgres will tear down after the
/// command exits
#[arg(trailing_var_arg = true)]
pub around: Vec<String>,
}

0 comments on commit 3e12061

Please sign in to comment.