diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-02-12 18:35:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-12 18:35:55 +0100 |
| commit | e887164a0a1fa07ae3786b846ee4b43a613dba24 (patch) | |
| tree | 21eae01fd0553b80a4bb931a19a92d59616f98be /zellij-server/src/plugins/plugin_loader.rs | |
| parent | Propagate plugin alias config changes to plugins (#4698) (diff) | |
| download | sl0ppij-e887164a0a1fa07ae3786b846ee4b43a613dba24.tar.gz sl0ppij-e887164a0a1fa07ae3786b846ee4b43a613dba24.tar.xz sl0ppij-e887164a0a1fa07ae3786b846ee4b43a613dba24.zip | |
Allow plugins to read env vars present upon session creation (behind permission) (#4700)
* allow plugins to read environment variables
* rustfmt
* add pr
Diffstat (limited to 'zellij-server/src/plugins/plugin_loader.rs')
| -rw-r--r-- | zellij-server/src/plugins/plugin_loader.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zellij-server/src/plugins/plugin_loader.rs b/zellij-server/src/plugins/plugin_loader.rs index 723b1b5a..c0b4ee60 100644 --- a/zellij-server/src/plugins/plugin_loader.rs +++ b/zellij-server/src/plugins/plugin_loader.rs @@ -60,6 +60,7 @@ pub struct PluginLoader<'a> { plugin_config: PluginConfig, tab_index: Option<usize>, path_to_default_shell: PathBuf, + session_env_vars: std::collections::BTreeMap<String, String>, capabilities: PluginCapabilities, client_attributes: ClientAttributes, default_shell: Option<TerminalAction>, @@ -104,6 +105,7 @@ impl<'a> PluginLoader<'a> { plugin_config: loading_context.plugin_config, tab_index: loading_context.tab_index, path_to_default_shell: loading_context.path_to_default_shell, + session_env_vars: loading_context.session_env_vars, capabilities: loading_context.capabilities, client_attributes: loading_context.client_attributes, default_shell: loading_context.default_shell, @@ -269,6 +271,7 @@ impl<'a> PluginLoader<'a> { default_shell: self.default_shell.clone(), default_layout: self.default_layout.clone(), plugin_cwd: self.plugin_cwd.clone(), + session_env_vars: self.session_env_vars.clone(), input_pipes_to_unblock: Arc::new(Mutex::new(HashSet::new())), input_pipes_to_block: Arc::new(Mutex::new(HashSet::new())), layout_dir: self.layout_dir.clone(), @@ -383,6 +386,7 @@ impl<'a> PluginLoader<'a> { default_shell: self.default_shell.clone(), default_layout: self.default_layout.clone(), plugin_cwd: self.plugin_cwd.clone(), + session_env_vars: self.session_env_vars.clone(), input_pipes_to_unblock: Arc::new(Mutex::new(HashSet::new())), input_pipes_to_block: Arc::new(Mutex::new(HashSet::new())), layout_dir: self.layout_dir.clone(), |
