diff options
author | Aram Drevekenin <aram@poor.dev> | 2023-11-05 15:32:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-05 15:32:05 +0100 |
commit | 28a165a969a9e1ee9f1fe66e4d63134b895b2ef7 (patch) | |
tree | 678ec1cd9d536d9cb7fcdb071e27cf12caf43afb /zellij-tile | |
parent | 9eb9734bcca3cb0dcdff592da4d7a536d860c363 (diff) |
feat(ux): allow renaming sessions (#2903)
* change session name through the cli
* change session name from the session-manager
* style(fmt): rustfmt
Diffstat (limited to 'zellij-tile')
-rw-r--r-- | zellij-tile/src/shim.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zellij-tile/src/shim.rs b/zellij-tile/src/shim.rs index eb898b4fc..8f2b297a3 100644 --- a/zellij-tile/src/shim.rs +++ b/zellij-tile/src/shim.rs @@ -682,6 +682,14 @@ pub fn delete_all_dead_sessions() { unsafe { host_run_plugin_command() }; } +/// Rename the current session +pub fn rename_session(name: &str) { + let plugin_command = PluginCommand::RenameSession(name.to_owned()); + let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); + object_to_stdout(&protobuf_plugin_command.encode_to_vec()); + unsafe { host_run_plugin_command() }; +} + // Utility Functions #[allow(unused)] |