diff options
author | Aram Drevekenin <aram@poor.dev> | 2022-10-28 13:03:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 13:03:37 +0200 |
commit | c97b972383d50ae6db750d4d7f2441232e41ba4c (patch) | |
tree | 448c6f3d626e7c405ec1e54c2be2ccf5a6bd2be7 /zellij-utils/src/cli.rs | |
parent | eed9541a74879e1ec683beda13ccfda7e63bfa88 (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.rs | 15 |
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 { |