Add misc command help messages
This commit is contained in:
@@ -71,18 +71,22 @@ enum Command {
|
|||||||
#[command(flatten)]
|
#[command(flatten)]
|
||||||
Client(client::commands::ClientCommand),
|
Client(client::commands::ClientCommand),
|
||||||
|
|
||||||
|
/// Run the server
|
||||||
#[command(hide = true)]
|
#[command(hide = true)]
|
||||||
Server(server::command::ServerArgs),
|
Server(server::command::ServerArgs),
|
||||||
|
|
||||||
|
/// Generate shell completions for the program.
|
||||||
#[command(hide = true)]
|
#[command(hide = true)]
|
||||||
GenerateCompletions(GenerateCompletionArgs),
|
GenerateCompletions(GenerateCompletionArgs),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Parser, Debug, Clone)]
|
#[derive(Parser, Debug, Clone)]
|
||||||
struct GenerateCompletionArgs {
|
struct GenerateCompletionArgs {
|
||||||
|
/// Which shell to generate completions for.
|
||||||
#[arg(long, default_value = "bash")]
|
#[arg(long, default_value = "bash")]
|
||||||
shell: Shell,
|
shell: Shell,
|
||||||
|
|
||||||
|
/// Which top-level command to generate completions for.
|
||||||
#[arg(long, default_value = "muscl")]
|
#[arg(long, default_value = "muscl")]
|
||||||
command: ToplevelCommands,
|
command: ToplevelCommands,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,18 +12,25 @@ pub struct ServerArgs {
|
|||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
pub subcmd: ServerCommand,
|
pub subcmd: ServerCommand,
|
||||||
|
|
||||||
|
/// Enable systemd mode
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub systemd: bool,
|
pub systemd: bool,
|
||||||
|
|
||||||
|
/// Disable Landlock sandboxing.
|
||||||
|
///
|
||||||
|
/// This is useful if you are planning to reload the server's configuration.
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub disable_landlock: bool,
|
pub disable_landlock: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Parser, Debug, Clone)]
|
#[derive(Parser, Debug, Clone)]
|
||||||
pub enum ServerCommand {
|
pub enum ServerCommand {
|
||||||
|
/// Start the server and listen for incoming connections on the unix socket
|
||||||
|
/// specified in the configuration file.
|
||||||
#[command()]
|
#[command()]
|
||||||
Listen,
|
Listen,
|
||||||
|
|
||||||
|
/// Start the server using systemd socket activation.
|
||||||
#[command()]
|
#[command()]
|
||||||
SocketActivate,
|
SocketActivate,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user