Standardize error messages, formatting, and code style. Refine --help text for consistency. Update comments for clarity and tone alignment.

This commit is contained in:
2026-08-13 17:50:06 +02:00
parent e36360e18c
commit 1b947fec24
7 changed files with 123 additions and 121 deletions

View File

@@ -11,7 +11,7 @@ pub struct Cli {
#[derive(Subcommand)]
pub enum Commands {
/// Save a new forward profile (doesn't open it).
/// Save a new forward profile.
#[command(visible_alias = "create", visible_alias = "new")]
Add(AddArgs),
@@ -54,11 +54,11 @@ pub enum Commands {
/// struct (`#[command(flatten)]`ed into both) so the two can never drift.
#[derive(Args, Default)]
pub struct MappingArgs {
/// Local forward: your machine -> remote.
/// Local forward (current machine -> remote machine).
#[arg(short, long, value_name = "[BIND:]PORT:HOST:PORT")]
pub local: Option<String>,
/// Remote forward: remote -> your machine.
/// Remote forward (remote machine -> current machine).
#[arg(short, long, value_name = "[BIND:]PORT:HOST:PORT")]
pub remote: Option<String>,
@@ -78,23 +78,23 @@ pub struct MappingArgs {
#[arg(short, long, value_name = "PATH")]
pub identity: Option<String>,
/// SSH port on the final target only.
/// SSH port of the final target.
#[arg(short, long, value_name = "PORT")]
pub port: Option<u16>,
/// Auto-reconnect on drop.
/// Auto-reconnect on connection drop.
#[arg(long, num_args = 0..=1, default_missing_value = "true", value_name = "BOOL")]
pub reconnect: Option<bool>,
/// Base delay between reconnect attempts, in seconds.
/// Base delay between reconnection attempts, in seconds.
#[arg(long = "retry-interval", value_name = "SECONDS")]
pub retry_interval: Option<u32>,
/// Cap on the doubling reconnect delay, in seconds.
/// Cap on the doubling reconnection delay, in seconds.
#[arg(long = "backoff-max", value_name = "SECONDS")]
pub backoff_max: Option<u32>,
/// ServerAliveInterval, in seconds.
/// SSH ServerAliveInterval, in seconds\.
#[arg(long, value_name = "SECONDS")]
pub keepalive: Option<u32>,
}