diff options
author | Kirill Bulatov <mail4score@gmail.com> | 2024-03-18 03:15:39 +0200 |
---|---|---|
committer | Christian Duerr <contact@christianduerr.com> | 2024-03-19 02:20:53 +0100 |
commit | 215a0becb6da37e432eccdbdd8f165a864e9864a (patch) | |
tree | b0ca33a1834380ca290f257f4966514ebcc58f8c /alacritty_terminal/src/tty/unix.rs | |
parent | 31a27e9f9feb34b6be90e2fcc8120e972c3b92c5 (diff) | |
download | alacritty-215a0becb6da37e432eccdbdd8f165a864e9864a.tar.gz alacritty-215a0becb6da37e432eccdbdd8f165a864e9864a.zip |
Allow setting terminal env vars via PTY options
Closes #7778.
Diffstat (limited to 'alacritty_terminal/src/tty/unix.rs')
-rw-r--r-- | alacritty_terminal/src/tty/unix.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/alacritty_terminal/src/tty/unix.rs b/alacritty_terminal/src/tty/unix.rs index 455abbd2..a4b07b74 100644 --- a/alacritty_terminal/src/tty/unix.rs +++ b/alacritty_terminal/src/tty/unix.rs @@ -217,9 +217,11 @@ pub fn new(config: &Options, window_size: WindowSize, window_id: u64) -> Result< builder.env("ALACRITTY_WINDOW_ID", &window_id); builder.env("USER", user.user); builder.env("HOME", user.home); - // Set Window ID for clients relying on X11 hacks. builder.env("WINDOWID", window_id); + for (key, value) in &config.env { + builder.env(key, value); + } unsafe { builder.pre_exec(move || { |