Add misc command help messages

This commit is contained in:
2025-12-01 12:29:18 +09:00
parent a6db254c20
commit 79f2a2b497
2 changed files with 11 additions and 0 deletions

View File

@@ -71,18 +71,22 @@ enum Command {
#[command(flatten)]
Client(client::commands::ClientCommand),
/// Run the server
#[command(hide = true)]
Server(server::command::ServerArgs),
/// Generate shell completions for the program.
#[command(hide = true)]
GenerateCompletions(GenerateCompletionArgs),
}
#[derive(Parser, Debug, Clone)]
struct GenerateCompletionArgs {
/// Which shell to generate completions for.
#[arg(long, default_value = "bash")]
shell: Shell,
/// Which top-level command to generate completions for.
#[arg(long, default_value = "muscl")]
command: ToplevelCommands,
}

View File

@@ -12,18 +12,25 @@ pub struct ServerArgs {
#[command(subcommand)]
pub subcmd: ServerCommand,
/// Enable systemd mode
#[arg(long)]
pub systemd: bool,
/// Disable Landlock sandboxing.
///
/// This is useful if you are planning to reload the server's configuration.
#[arg(long)]
pub disable_landlock: bool,
}
#[derive(Parser, Debug, Clone)]
pub enum ServerCommand {
/// Start the server and listen for incoming connections on the unix socket
/// specified in the configuration file.
#[command()]
Listen,
/// Start the server using systemd socket activation.
#[command()]
SocketActivate,
}