summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/cli.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2022-10-28 13:03:37 +0200
committerGitHub <noreply@github.com>2022-10-28 13:03:37 +0200
commitc97b972383d50ae6db750d4d7f2441232e41ba4c (patch)
tree448c6f3d626e7c405ec1e54c2be2ccf5a6bd2be7 /zellij-utils/src/cli.rs
parenteed9541a74879e1ec683beda13ccfda7e63bfa88 (diff)
feat(command-panes): optionally allow panes to be closed on exit (#1869)
* feat(cli): allow option to close command pane on exit * feat(layouts): allow option to close command panes on exit * style(fmt): rustfmt
Diffstat (limited to 'zellij-utils/src/cli.rs')
-rw-r--r--zellij-utils/src/cli.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs
index 0525c0380..6f0ac59a7 100644
--- a/zellij-utils/src/cli.rs
+++ b/zellij-utils/src/cli.rs
@@ -146,6 +146,10 @@ pub enum Sessions {
/// Name of the new pane
#[clap(short, long, value_parser)]
name: Option<String>,
+
+ /// Close the pane immediately when its command exits
+ #[clap(short, long, value_parser, default_value("false"), takes_value(false))]
+ close_on_exit: bool,
},
/// Edit file with default $EDITOR / $VISUAL
#[clap(visible_alias = "e")]
@@ -246,6 +250,17 @@ pub enum CliAction {
/// Name of the new pane
#[clap(short, long, value_parser)]
name: Option<String>,
+
+ /// Close the pane immediately when its command exits
+ #[clap(
+ short,
+ long,
+ value_parser,
+ default_value("false"),
+ takes_value(false),
+ requires("command")
+ )]
+ close_on_exit: bool,
},
/// Open the specified file in a new zellij pane with your default EDITOR
Edit {