feat(plugins): allow plugins to specify own_url in pipe destination (#3232)
This commit is contained in:
parent
2908d2fcef
commit
9885664fa4
1 changed files with 7 additions and 1 deletions
|
|
@ -320,7 +320,13 @@ fn cli_pipe_output(env: &ForeignFunctionEnv, pipe_name: String, output: String)
|
||||||
.context("failed to send pipe output")
|
.context("failed to send pipe output")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn message_to_plugin(env: &ForeignFunctionEnv, message_to_plugin: MessageToPlugin) -> Result<()> {
|
fn message_to_plugin(
|
||||||
|
env: &ForeignFunctionEnv,
|
||||||
|
mut message_to_plugin: MessageToPlugin,
|
||||||
|
) -> Result<()> {
|
||||||
|
if message_to_plugin.plugin_url.as_ref().map(|s| s.as_str()) == Some("zellij:OWN_URL") {
|
||||||
|
message_to_plugin.plugin_url = Some(env.plugin_env.plugin.location.display());
|
||||||
|
}
|
||||||
env.plugin_env
|
env.plugin_env
|
||||||
.senders
|
.senders
|
||||||
.send_to_plugin(PluginInstruction::MessageFromPlugin {
|
.send_to_plugin(PluginInstruction::MessageFromPlugin {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue