aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/cli.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-07-09 16:52:50 +0200
committerGitHub <noreply@github.com>2026-07-09 16:52:50 +0200
commit4bfda976b110b5d3182fca004ee7031f6322253e (patch)
treeff16cdbec15673861ee0907181a25f709565b4fd /zellij-utils/src/cli.rs
parentfix: focus last pane correctness issues (#5344) (diff)
downloadsl0ppij-4bfda976b110b5d3182fca004ee7031f6322253e.tar.gz
sl0ppij-4bfda976b110b5d3182fca004ee7031f6322253e.tar.xz
sl0ppij-4bfda976b110b5d3182fca004ee7031f6322253e.zip
Allow creating panes/tabs from the CLI without changing focus to them (#5346)
* feat: allow opening panes and tabs from the cli without focusing them * rustfmt * fix flake * rustfmt * add pr
Diffstat (limited to 'zellij-utils/src/cli.rs')
-rw-r--r--zellij-utils/src/cli.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs
index ee2b6da1..e09755e0 100644
--- a/zellij-utils/src/cli.rs
+++ b/zellij-utils/src/cli.rs
@@ -520,6 +520,11 @@ pub enum Sessions {
/// if set, will open the pane near the current one rather than following the user's focus
#[clap(long)]
near_current_pane: bool,
+ #[clap(
+ long,
+ help = "if set, will open the pane without changing the focus of any client, placing it relative to the pane the command was issued from"
+ )]
+ no_focus: bool,
/// start this pane without a border (warning: will make it impossible to move with the
/// mouse)
#[clap(short, long, value_parser)]
@@ -588,6 +593,11 @@ pub enum Sessions {
/// Whether to pin a floating pane so that it is always on top
#[clap(long, requires("floating"))]
pinned: Option<bool>,
+ #[clap(
+ long,
+ help = "if set, will open the plugin pane without changing the focus of any client, placing it relative to the pane the command was issued from"
+ )]
+ no_focus: bool,
/// start this pane without a border (warning: will make it impossible to move with the
/// mouse)
#[clap(short, long, value_parser)]
@@ -657,6 +667,11 @@ pub enum Sessions {
/// if set, will open the pane near the current one rather than following the user's focus
#[clap(long)]
near_current_pane: bool,
+ #[clap(
+ long,
+ help = "if set, will open the pane without changing the focus of any client, placing it relative to the pane the command was issued from"
+ )]
+ no_focus: bool,
/// start this pane without a border (warning: will make it impossible to move with the
/// mouse)
#[clap(short, long, value_parser)]
@@ -1050,6 +1065,11 @@ pub enum CliAction {
/// if set, will open the pane near the current one rather than following the user's focus
#[clap(long)]
near_current_pane: bool,
+ #[clap(
+ long,
+ help = "if set, will open the pane without changing the focus of any client, placing it relative to the pane the command was issued from"
+ )]
+ no_focus: bool,
/// start this pane without a border (warning: will make it impossible to move with the
/// mouse)
#[clap(long, value_parser)]
@@ -1123,6 +1143,11 @@ pub enum CliAction {
/// if set, will open the pane near the current one rather than following the user's focus
#[clap(long)]
near_current_pane: bool,
+ #[clap(
+ long,
+ help = "if set, will open the pane without changing the focus of any client, placing it relative to the pane the command was issued from"
+ )]
+ no_focus: bool,
/// start this pane without a border (warning: will make it impossible to move with the
/// mouse)
#[clap(short, long, value_parser)]
@@ -1335,6 +1360,12 @@ pub enum CliAction {
conflicts_with("block-until-exit-failure")
)]
block_until_exit: bool,
+
+ #[clap(
+ long,
+ help = "if set, will create the tab without changing the focus of any client"
+ )]
+ no_focus: bool,
},
/// Move the focused tab in the specified direction. [right|left]
MoveTab {
@@ -1437,6 +1468,11 @@ pub enum CliAction {
configuration: Option<PluginUserConfiguration>,
#[clap(short, long, value_parser)]
skip_plugin_cache: bool,
+ #[clap(
+ long,
+ help = "if set, will open the plugin pane without changing the focus of any client"
+ )]
+ no_focus: bool,
/// Target a specific tab by ID
#[clap(long, value_parser, conflicts_with("in-place"))]
tab_id: Option<usize>,