summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/cli.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2022-10-17 19:39:37 +0200
committerGitHub <noreply@github.com>2022-10-17 19:39:37 +0200
commit271abb3ea2842cadc131ae91a3cd899e320e958e (patch)
treeb20d4231f6d5b46737efe6b60b4e4e0170a87640 /zellij-utils/src/cli.rs
parent4562982409cfcdfc151c5a4c2878d358dac9e76c (diff)
feat(cli): zellij run improvements (#1804)
* feat(cli): move command to the end of the cli arguments * feat(cli): allow naming panes from the command line * fix(cli): adjust actions after pane rename * feat(cli): zellij run completions for fish * feat(cli): zellij run completions for bash and zsh * style(fmt): rustfmt * fix(e2e): fix run test and snapshot * style(fmt): rustfmt
Diffstat (limited to 'zellij-utils/src/cli.rs')
-rw-r--r--zellij-utils/src/cli.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs
index ae0c2141c..c7c7b0dcf 100644
--- a/zellij-utils/src/cli.rs
+++ b/zellij-utils/src/cli.rs
@@ -127,13 +127,16 @@ pub enum Sessions {
/// Run a command in a new pane
#[clap(visible_alias = "r")]
Run {
- command: Option<String>,
+ #[clap(last(true), required(true))]
+ command: Vec<String>,
#[clap(short, long, value_parser, conflicts_with("floating"))]
direction: Option<Direction>,
#[clap(long, value_parser)]
cwd: Option<PathBuf>,
#[clap(short, long, value_parser, default_value("false"), takes_value(false))]
floating: bool,
+ #[clap(short, long, value_parser)]
+ name: Option<String>,
},
/// Edit file with default $EDITOR / $VISUAL
#[clap(visible_alias = "e")]
@@ -206,12 +209,14 @@ pub enum CliAction {
NewPane {
#[clap(short, long, value_parser, conflicts_with("floating"))]
direction: Option<Direction>,
- #[clap(short, long, value_parser)]
- command: Option<String>,
+ #[clap(last(true))]
+ command: Vec<String>,
#[clap(long, value_parser)]
cwd: Option<PathBuf>,
#[clap(short, long, value_parser, default_value("false"), takes_value(false))]
floating: bool,
+ #[clap(short, long, value_parser)]
+ name: Option<String>,
},
/// Open the specified file in a new zellij pane with your default EDITOR
Edit {