From c97b972383d50ae6db750d4d7f2441232e41ba4c Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Fri, 28 Oct 2022 13:03:37 +0200 Subject: 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 --- zellij-utils/src/cli.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'zellij-utils/src/cli.rs') 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, + + /// 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, + + /// 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 { -- cgit v1.2.3