Skip to content

Commit 3bc136d

Browse files
committed
fix: suppress file/directory completion for RPC name arguments
1 parent e9778c2 commit 3bc136d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

twinleaf-tools/src/tio_cli.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use clap::{Subcommand, ValueEnum};
1+
use clap::{builder::ValueHint, Subcommand, ValueEnum};
22
use clap_complete::Shell;
33

44
#[derive(Parser, Debug)]
@@ -51,12 +51,14 @@ pub enum Commands {
5151
subcommands: Option<RPCSubcommands>,
5252

5353
/// RPC name to execute
54+
#[arg(value_hint = ValueHint::Other)]
5455
rpc_name: Option<String>,
5556

5657
/// RPC argument value
5758
#[arg(
5859
allow_negative_numbers = true,
5960
value_name = "ARG",
61+
value_hint = ValueHint::Other,
6062
help_heading = "RPC Arguments"
6163
)]
6264
rpc_arg: Option<String>,
@@ -139,6 +141,7 @@ pub enum Commands {
139141
tio: TioOpts,
140142

141143
/// Input firmware image path
144+
#[arg(value_hint = ValueHint::FilePath)]
142145
firmware_path: String,
143146

144147
/// Skip confirmation prompt
@@ -181,6 +184,7 @@ pub enum RPCSubcommands{
181184
tio: TioOpts,
182185

183186
/// RPC name to dump
187+
#[arg(value_hint = ValueHint::Other)]
184188
rpc_name: String,
185189

186190
/// Trigger a capture before dumping

0 commit comments

Comments
 (0)