aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/tty/unix.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/tty/unix.rs')
-rw-r--r--alacritty_terminal/src/tty/unix.rs9
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)