summaryrefslogtreecommitdiffstats
path: root/src/cli
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2022-07-04 15:52:29 +0200
committerCanop <cano.petrole@gmail.com>2022-07-04 15:52:29 +0200
commit66cd05bf66f6e4ecd08f237c84e5f233722678a9 (patch)
tree11c063d4f546104ca9247495ba7faeb3b2ca03f6 /src/cli
parent8e2cacc24bfa393269ec77ad512752b77d044e4b (diff)
fix `--cmd` not working
Fix #570
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/args.rs2
-rw-r--r--src/cli/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cli/args.rs b/src/cli/args.rs
index 56ec4e5..707dd91 100644
--- a/src/cli/args.rs
+++ b/src/cli/args.rs
@@ -110,7 +110,7 @@ pub struct Args {
/// Semicolon separated commands to execute
#[clap(short, long, value_parser)]
- pub commands: Option<String>,
+ pub cmd: Option<String>,
/// Whether to have styles and colors (auto is default and usually OK)
#[clap(long, arg_enum, value_parser, default_value="auto")]
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 681d0e7..c57762b 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -101,7 +101,7 @@ pub fn run() -> Result<Option<Launchable>, ProgramError> {
net::{Client, Message},
};
let client = Client::new(server_name);
- if let Some(seq) = &context.launch_args.commands {
+ if let Some(seq) = &context.launch_args.cmd {
let message = Message::Sequence(Sequence::new_local(seq.to_string()));
client.send(&message)?;
} else if !context.launch_args.get_root {