diff options
| author | har7an <99636919+har7an@users.noreply.github.com> | 2024-04-04 13:26:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-04 13:26:42 +0000 |
| commit | cf18fb386750b7e17c063d5944f82c1f1c8303f5 (patch) | |
| tree | c30cab056624ea6050dbf0f5f6f85da529841974 | |
| parent | docs(changelog): zellij:OWN_URL (diff) | |
| download | sl0ppij-cf18fb386750b7e17c063d5944f82c1f1c8303f5.tar.gz sl0ppij-cf18fb386750b7e17c063d5944f82c1f1c8303f5.tar.xz sl0ppij-cf18fb386750b7e17c063d5944f82c1f1c8303f5.zip | |
utils/cli: Add `move-tab` action (#3244)
* utils/cli: Add `move-tab` action
which was previously only exposed through keybindings.
* CHANGELOG: Add PR 3244.
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | zellij-utils/src/cli.rs | 4 | ||||
| -rw-r--r-- | zellij-utils/src/input/actions.rs | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8581eb8e..17fcd88a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * fix(plugins): properly serialize remote urls (https://github.com/zellij-org/zellij/pull/3224) * feat(plugins): add close_self API to allow plugins to close their own instance (https://github.com/zellij-org/zellij/pull/3228) * feat(plugins): allow plugins to specify `zellij:OWN_URL` as a pipe destination (https://github.com/zellij-org/zellij/pull/3232) +* feat(cli): Add `move-tab` action (https://github.com/zellij-org/zellij/pull/3244) ## [0.39.2] - 2023-11-29 * fix(cli): typo in cli help (https://github.com/zellij-org/zellij/pull/2906) diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs index f224b5ef..0388e599 100644 --- a/zellij-utils/src/cli.rs +++ b/zellij-utils/src/cli.rs @@ -617,6 +617,10 @@ pub enum CliAction { #[clap(short, long, value_parser, requires("layout"))] cwd: Option<PathBuf>, }, + /// Move the focused tab in the specified direction. [right|left] + MoveTab { + direction: Direction, + }, PreviousSwapLayout, NextSwapLayout, /// Query all tab names diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs index e72b6b64..61a789d1 100644 --- a/zellij-utils/src/input/actions.rs +++ b/zellij-utils/src/input/actions.rs @@ -325,6 +325,7 @@ impl Action { CliAction::MoveFocusOrTab { direction } => Ok(vec![Action::MoveFocusOrTab(direction)]), CliAction::MovePane { direction } => Ok(vec![Action::MovePane(direction)]), CliAction::MovePaneBackwards => Ok(vec![Action::MovePaneBackwards]), + CliAction::MoveTab { direction } => Ok(vec![Action::MoveTab(direction)]), CliAction::Clear => Ok(vec![Action::ClearScreen]), CliAction::DumpScreen { path, full } => Ok(vec