summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/plugin_api/plugin_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zellij-utils/src/plugin_api/plugin_command.rs')
-rw-r--r--zellij-utils/src/plugin_api/plugin_command.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/plugin_command.rs b/zellij-utils/src/plugin_api/plugin_command.rs
index 84c083ad5..6b70b18eb 100644
--- a/zellij-utils/src/plugin_api/plugin_command.rs
+++ b/zellij-utils/src/plugin_api/plugin_command.rs
@@ -628,6 +628,13 @@ impl TryFrom<ProtobufPluginCommand> for PluginCommand {
},
_ => Err("Mismatched payload for WebRequest"),
},
+ Some(CommandName::DeleteDeadSession) => match protobuf_plugin_command.payload {
+ Some(Payload::DeleteDeadSessionPayload(dead_session_name)) => {
+ Ok(PluginCommand::DeleteDeadSession(dead_session_name))
+ },
+ _ => Err("Mismatched payload for DeleteDeadSession"),
+ },
+ Some(CommandName::DeleteAllDeadSessions) => Ok(PluginCommand::DeleteAllDeadSessions),
None => Err("Unrecognized plugin command"),
}
}
@@ -1044,6 +1051,14 @@ impl TryFrom<PluginCommand> for ProtobufPluginCommand {
})),
})
},
+ PluginCommand::DeleteDeadSession(dead_session_name) => Ok(ProtobufPluginCommand {
+ name: CommandName::DeleteDeadSession as i32,
+ payload: Some(Payload::DeleteDeadSessionPayload(dead_session_name)),
+ }),
+ PluginCommand::DeleteAllDeadSessions => Ok(ProtobufPluginCommand {
+ name: CommandName::DeleteAllDeadSessions as i32,
+ payload: None,
+ }),
}
}
}