diff options
| author | Aram Drevekenin <aram@poor.dev> | 2024-10-22 15:27:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-22 15:27:40 +0200 |
| commit | d671ab650e231d353a05a2808c0984e952de38c4 (patch) | |
| tree | 38a0604f9b4b20adfed5cf3e8324c59fbdf1ff2b /zellij-utils/src/plugin_api/plugin_command.rs | |
| parent | docs(changelog): wasmtime patch upgrade (diff) | |
| download | sl0ppij-d671ab650e231d353a05a2808c0984e952de38c4.tar.gz sl0ppij-d671ab650e231d353a05a2808c0984e952de38c4.tar.xz sl0ppij-d671ab650e231d353a05a2808c0984e952de38c4.zip | |
feat(plugins): add API to list clients, their focused panes and running commands/plugins (#3687)
* fix(list-clients): properly show client info after a tab was closed
* feat(plugins): add API to list clients, their focused panes and running commands/plugins
* style(fmt): rustfmt
Diffstat (limited to 'zellij-utils/src/plugin_api/plugin_command.rs')
| -rw-r--r-- | zellij-utils/src/plugin_api/plugin_command.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/plugin_command.rs b/zellij-utils/src/plugin_api/plugin_command.rs index 79b08794..06687971 100644 --- a/zellij-utils/src/plugin_api/plugin_command.rs +++ b/zellij-utils/src/plugin_api/plugin_command.rs @@ -1299,6 +1299,10 @@ impl TryFrom<ProtobufPluginCommand> for PluginCommand { }, _ => Err("Mismatched payload for RebindKeys"), }, + Some(CommandName::ListClients) => match protobuf_plugin_command.payload { + Some(_) => Err("ListClients should have no payload, found a payload"), + None => Ok(PluginCommand::ListClients), + }, None => Err("Unrecognized plugin command"), } } @@ -2122,6 +2126,10 @@ impl TryFrom<PluginCommand> for ProtobufPluginCommand { write_config_to_disk, })), }), + PluginCommand::ListClients => Ok(ProtobufPluginCommand { + name: CommandName::ListClients as i32, + payload: None, + }), } } } |
