Skip to content

Commit 3e12061

Browse files
committed
Document command line options
1 parent 84968ec commit 3e12061

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/src/cli/parser/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,28 @@ use clap::Parser;
22
use std::path::PathBuf;
33

44
#[derive(Parser, Debug)]
5+
#[command(version, about)]
56
pub struct Args {
7+
/// The directory to initialize a db cluster in
68
pub directory: PathBuf,
9+
/// Run postgres in an existing db cluster
710
#[arg(long)]
811
pub use_existing_dir: bool,
12+
/// Localhost port to listen on
913
#[arg(short, long)]
1014
pub port: Option<u16>,
15+
/// Control if the directory is deleted when tmp-postgres ends
1116
#[arg(long = "remove")]
1217
pub should_remove: Option<bool>,
18+
/// Start a psql session
1319
#[arg(long)]
1420
pub psql: bool,
21+
/// Silences stdout/stderr forwarding from initdb and postgres
1522
#[arg(long)]
1623
pub silent: bool,
24+
/// Optional command to run when tmp-postgres is ready to receive
25+
/// connections, when specified tmp-postgres will tear down after the
26+
/// command exits
1727
#[arg(trailing_var_arg = true)]
1828
pub around: Vec<String>,
1929
}

0 commit comments

Comments
 (0)