diff --git a/src/cli.rs b/src/cli.rs index d9eb6d66..6b9542c0 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -25,7 +25,7 @@ use { portal, }, ::log::Level, - clap::{builder::PossibleValue, Args, Parser, Subcommand, ValueEnum}, + clap::{builder::PossibleValue, Args, Parser, Subcommand, ValueEnum, ValueHint}, clap_complete::Shell, }; @@ -97,7 +97,7 @@ pub struct IdleArgs { #[derive(Args, Debug)] pub struct RunPrivilegedArgs { /// The program to run - #[clap(required = true)] + #[clap(required = true, trailing_var_arg = true, value_hint = ValueHint::CommandWithArguments)] pub program: Vec, } @@ -121,6 +121,7 @@ pub struct ScreenshotArgs { /// in the current directory. /// /// The filename can contain the usual strftime parameters. + #[clap(value_hint = ValueHint::FilePath)] pub filename: Option, } diff --git a/src/cli/input.rs b/src/cli/input.rs index 78c1105e..134c6cc4 100644 --- a/src/cli/input.rs +++ b/src/cli/input.rs @@ -10,7 +10,7 @@ use { utils::{errorfmt::ErrorFmt, string_ext::StringExt}, wire::{jay_compositor, jay_input, JayInputId}, }, - clap::{Args, Subcommand, ValueEnum}, + clap::{Args, Subcommand, ValueEnum, ValueHint}, isnt::std_1::vec::IsntVecExt, std::{ cell::RefCell, @@ -106,7 +106,7 @@ pub enum DeviceCommand { /// Set the acceleration speed. SetAccelSpeed(SetAccelSpeedArgs), /// Set whether tap is enabled. - SetTapEnabled(SetTapDragEnabledArgs), + SetTapEnabled(SetTapEnabledArgs), /// Set whether tap-drag is enabled. SetTapDragEnabled(SetTapDragEnabledArgs), /// Set whether tap-drag-lock is enabled. @@ -241,6 +241,7 @@ pub struct SetCursorSizeArgs { #[derive(Args, Debug, Clone)] pub struct SetKeymapArgs { /// The file to read the keymap from. Omit for stdin. + #[clap(value_hint = ValueHint::FilePath)] pub file: Option, }