diff options
| author | Aram Drevekenin <aram@poor.dev> | 2024-02-29 16:26:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-29 16:26:25 +0100 |
| commit | 896b09aa6f9190b4dc838314b028b63e0f2461b7 (patch) | |
| tree | 80aeda55e00e51dfc3d0fd8b6b4f6e6bbf493efd /default-plugins/fixture-plugin-for-tests/src/main.rs | |
| parent | docs(changelog): pipe to plugin id (diff) | |
| download | sl0ppij-896b09aa6f9190b4dc838314b028b63e0f2461b7.tar.gz sl0ppij-896b09aa6f9190b4dc838314b028b63e0f2461b7.tar.xz sl0ppij-896b09aa6f9190b4dc838314b028b63e0f2461b7.zip | |
feat(plugins): allow specifying the cwd when switching sessions (#3172)
* feat(plugins): allow specifying the cwd when switching sessions
* style(fmt): rustfmt
Diffstat (limited to 'default-plugins/fixture-plugin-for-tests/src/main.rs')
| -rw-r--r-- | default-plugins/fixture-plugin-for-tests/src/main.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/default-plugins/fixture-plugin-for-tests/src/main.rs b/default-plugins/fixture-plugin-for-tests/src/main.rs index 0da45a2f..cd4fb45a 100644 --- a/default-plugins/fixture-plugin-for-tests/src/main.rs +++ b/default-plugins/fixture-plugin-for-tests/src/main.rs @@ -299,12 +299,20 @@ impl ZellijPlugin for State { switch_session_with_layout( Some("my_other_new_session"), LayoutInfo::BuiltIn("compact".to_owned()), + None, ); }, Key::Ctrl('8') => { let mut file = std::fs::File::create("/host/hi-from-plugin.txt").unwrap(); file.write_all(b"Hi there!").unwrap(); }, + Key::Ctrl('9') => { + switch_session_with_layout( + Some("my_other_new_session_with_cwd"), + LayoutInfo::BuiltIn("compact".to_owned()), + Some(std::path::PathBuf::from("/tmp")), + ); + }, _ => {}, }, Event::CustomMessage(message, payload) => { |
