mirror of https://github.com/jackwener/wx-cli.git
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
parent
1106b4f544
commit
cba33e4630
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Reference in New Issue