diff options
author | Kirill Bulatov <mail4score@gmail.com> | 2024-03-18 03:15:39 +0200 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2024-08-14 15:41:13 -0600 |
commit | 2197a8eb53e260f56fc090d3f1c64fa76e25b8f1 (patch) | |
tree | ee0b7d3ca76193330e32e521bc1a20fbd289e429 /alacritty/src | |
parent | 24c1c2160717d99290a857c57b22251f8cedb41b (diff) | |
download | r-alacritty-2197a8eb53e260f56fc090d3f1c64fa76e25b8f1.tar.gz r-alacritty-2197a8eb53e260f56fc090d3f1c64fa76e25b8f1.tar.bz2 r-alacritty-2197a8eb53e260f56fc090d3f1c64fa76e25b8f1.zip |
Allow setting terminal env vars via PTY options
Closes #7778.
Diffstat (limited to 'alacritty/src')
-rw-r--r-- | alacritty/src/cli.rs | 2 | ||||
-rw-r--r-- | alacritty/src/config/ui_config.rs | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/alacritty/src/cli.rs b/alacritty/src/cli.rs index d5e24b4a..91ba2fd6 100644 --- a/alacritty/src/cli.rs +++ b/alacritty/src/cli.rs @@ -1,4 +1,5 @@ use std::cmp::max; +use std::collections::HashMap; use std::ops::{Deref, DerefMut}; use std::path::PathBuf; use std::rc::Rc; @@ -195,6 +196,7 @@ impl From<TerminalOptions> for PtyOptions { working_directory: options.working_directory.take(), shell: options.command().map(Into::into), hold: options.hold, + env: HashMap::new(), } } } diff --git a/alacritty/src/config/ui_config.rs b/alacritty/src/config/ui_config.rs index a4b6c2c5..580a3dad 100644 --- a/alacritty/src/config/ui_config.rs +++ b/alacritty/src/config/ui_config.rs @@ -167,7 +167,12 @@ impl UiConfig { /// Derive [`PtyOptions`] from the config. pub fn pty_config(&self) -> PtyOptions { let shell = self.shell.clone().map(Into::into); - PtyOptions { shell, working_directory: self.working_directory.clone(), hold: false } + PtyOptions { + shell, + working_directory: self.working_directory.clone(), + hold: false, + env: HashMap::new(), + } } /// Generate key bindings for all keyboard hints. |