diff options
| author | Aram Drevekenin <aram@poor.dev> | 2022-10-17 19:39:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-17 19:39:37 +0200 |
| commit | 271abb3ea2842cadc131ae91a3cd899e320e958e (patch) | |
| tree | b20d4231f6d5b46737efe6b60b4e4e0170a87640 /src | |
| parent | changelog: Add PR #1800 (diff) | |
| download | sl0ppij-271abb3ea2842cadc131ae91a3cd899e320e958e.tar.gz sl0ppij-271abb3ea2842cadc131ae91a3cd899e320e958e.tar.xz sl0ppij-271abb3ea2842cadc131ae91a3cd899e320e958e.zip | |
feat(cli): zellij run improvements (#1804)
* feat(cli): move command to the end of the cli arguments
* feat(cli): allow naming panes from the command line
* fix(cli): adjust actions after pane rename
* feat(cli): zellij run completions for fish
* feat(cli): zellij run completions for bash and zsh
* style(fmt): rustfmt
* fix(e2e): fix run test and snapshot
* style(fmt): rustfmt
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 2 | ||||
| -rw-r--r-- | src/tests/e2e/remote_runner.rs | 4 | ||||
| -rw-r--r-- | src/tests/e2e/snapshots/zellij__tests__e2e__cases__send_command_through_the_cli.snap | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index fa18f090..3df61c42 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,6 +24,7 @@ fn main() { direction, cwd, floating, + name, })) = opts.command { let command_cli_action = CliAction::NewPane { @@ -31,6 +32,7 @@ fn main() { direction, cwd, floating, + name, }; commands::send_action_to_session(command_cli_action, opts.session); std::process::exit(0); diff --git a/src/tests/e2e/remote_runner.rs b/src/tests/e2e/remote_runner.rs index b500149f..dd2c800d 100644 --- a/src/tests/e2e/remote_runner.rs +++ b/src/tests/e2e/remote_runner.rs @@ -345,7 +345,9 @@ impl RemoteTerminal { pub fn send_command_through_the_cli(&mut self, command: &str) { let mut channel = self.channel.lock().unwrap(); channel - .write_all(format!("{} run \"{}\"\n", ZELLIJ_EXECUTABLE_LOCATION, command).as_bytes()) + .write_all( + format!("{} run -- \"{}\"\n", ZELLIJ_EXECUTABLE_LOCATION, command).as_bytes(), + ) .unwrap(); channel.flush().unwrap(); } diff --git a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__send_command_through_the_cli.snap b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__send_command_through_the_cli.snap index 8f1e58cc..84d33a03 100644 --- a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__send_command_through_the_cli.snap +++ b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__send_command_through_the_cli.snap @@ -6,7 +6,7 @@ expression: last_snapshot Zellij (e2e-test) Tab #1 ┌ Pane #1 ─────────────────────────────────────────────────┐┌ /usr/src/zellij/fixtures/append-echo-script.sh ──────────┐ │$ /usr/src/zellij/x86_64-unknown-linux-musl/release/zellij││foo │ -│ run "/usr/src/zellij/fixtures/append-echo-script.sh" ││foo │ +│ run -- "/usr/src/zellij/fixtures/append-echo-script.sh" ││foo │ │$ ││█ │ │ ││ │ │ ││ │ |
