Add --open flag support to the docs server
This commit is contained in:
+18
@@ -37,6 +37,14 @@
|
||||
//!
|
||||
//! let args = Args::parse();
|
||||
//! ```
|
||||
//!
|
||||
//! # Running the Bot
|
||||
//!
|
||||
//! To start the bot, run:
|
||||
//!
|
||||
//! ```shell
|
||||
//! $ cargo run -- start [TOKEN]
|
||||
//! ```
|
||||
|
||||
/// Payphone's argument parser.
|
||||
#[derive(clap::Parser)]
|
||||
@@ -130,5 +138,15 @@ pub enum Commands {
|
||||
default_value_t = 3000
|
||||
)]
|
||||
port: u16,
|
||||
|
||||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "PAYPHONE_DOCS_OPEN",
|
||||
value_name = "OPEN",
|
||||
default_value_t = false,
|
||||
help = "Open the documentation in the default browser after starting the server."
|
||||
)]
|
||||
open: bool,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user