diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2023-11-10 18:16:22 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 18:16:22 +0400 |
commit | 5060f8eeb864e8c304fbad9588bdd882db942356 (patch) | |
tree | b615ded19e6ac545b495f716e2a22ecd903332af /alacritty_terminal/src/tty/unix.rs | |
parent | 3ffd6c8f26f9788466b9ba95659b8de970a10f08 (diff) | |
download | alacritty-5060f8eeb864e8c304fbad9588bdd882db942356.tar.gz alacritty-5060f8eeb864e8c304fbad9588bdd882db942356.zip |
Remove `alacritty_config` from alacritty_terminal
There's no need to force alacritty's user configuration on
other users of the crate, thus provide the options actually used
by alacritty_terminal itself.
Diffstat (limited to 'alacritty_terminal/src/tty/unix.rs')
-rw-r--r-- | alacritty_terminal/src/tty/unix.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/alacritty_terminal/src/tty/unix.rs b/alacritty_terminal/src/tty/unix.rs index 6b543437..2b4f8e54 100644 --- a/alacritty_terminal/src/tty/unix.rs +++ b/alacritty_terminal/src/tty/unix.rs @@ -22,9 +22,8 @@ use rustix_openpty::rustix::termios::{self, InputModes, OptionalActions}; use signal_hook::consts as sigconsts; use signal_hook::low_level::pipe as signal_pipe; -use crate::config::PtyConfig; use crate::event::{OnResize, WindowSize}; -use crate::tty::{ChildEvent, EventedPty, EventedReadWrite}; +use crate::tty::{ChildEvent, EventedPty, EventedReadWrite, Options}; // Interest in PTY read/writes. pub(crate) const PTY_READ_WRITE_TOKEN: usize = 0; @@ -194,7 +193,7 @@ fn default_shell_command(shell: &str, user: &str) -> Command { } /// Create a new TTY and return a handle to interact with it. -pub fn new(config: &PtyConfig, window_size: WindowSize, window_id: u64) -> Result<Pty> { +pub fn new(config: &Options, window_size: WindowSize, window_id: u64) -> Result<Pty> { let (master, slave) = make_pty(window_size.to_winsize())?; let master_fd = master.as_raw_fd(); let slave_fd = slave.as_raw_fd(); @@ -209,8 +208,8 @@ pub fn new(config: &PtyConfig, window_size: WindowSize, window_id: u64) -> Resul let user = ShellUser::from_env()?; let mut builder = if let Some(shell) = config.shell.as_ref() { - let mut cmd = Command::new(shell.program()); - cmd.args(shell.args()); + let mut cmd = Command::new(&shell.program); + cmd.args(shell.args.as_slice()); cmd } else { default_shell_command(&user.shell, &user.user) |