diff options
author | Kirill Bulatov <mail4score@gmail.com> | 2024-03-18 03:15:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 01:15:39 +0000 |
commit | fe88aaa0855283d689dc41d531db916404ef9c51 (patch) | |
tree | ac70edbdeefdf4762ced6f57921a9569052d482e /alacritty_terminal/src/tty/unix.rs | |
parent | 14b53f18dbae3f434a5011a9fb49b52574caedaf (diff) | |
download | alacritty-fe88aaa0855283d689dc41d531db916404ef9c51.tar.gz alacritty-fe88aaa0855283d689dc41d531db916404ef9c51.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 || { |