fix(cli): require '=' for --tcp flag to prevent subcommand collision

--tcp consumed the following subcommand as its value (e.g.
'wx --tcp daemon start' parsed --tcp=daemon). Adding
require_equals=true forces --tcp=ADDR syntax so subcommands
are parsed correctly.
pull/43/head
David Li 2026-05-13 18:12:08 +08:00
parent 1106b4f544
commit cba33e4630
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ use clap::{Parser, Subcommand};
#[command(name = "wx", version = env!("CARGO_PKG_VERSION"), about = "wx — 微信本地数据 CLI")]
pub struct Cli {
/// 通过 TCP 连接 daemon如 127.0.0.1:9876
#[arg(long)]
#[arg(long, require_equals = true)]
pub tcp: Option<String>,
#[command(subcommand)]