diff options
author | Justin Charette <charetjc@gmail.com> | 2017-04-01 19:30:29 -0400 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-04-03 20:46:08 -0700 |
commit | 5b079f6d437c567a1533a719194f6e579a7eedae (patch) | |
tree | 49df82009ea231c7088886f5f4b19b7b9c6c999c /src/tty.rs | |
parent | 2d1af06c2d17d45e978479f4fc567b706beb1e3e (diff) | |
download | alacritty-5b079f6d437c567a1533a719194f6e579a7eedae.tar.gz alacritty-5b079f6d437c567a1533a719194f6e579a7eedae.zip |
Do not replace $SHELL with --command option
Signed-off-by: Justin Charette <charetjc@gmail.com>
Diffstat (limited to 'src/tty.rs')
-rw-r--r-- | src/tty.rs | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -188,12 +188,13 @@ pub fn new<T: ToWinsize>(config: &Config, options: &Options, size: T) -> Pty { let (master, slave) = openpty(win.ws_row as _, win.ws_col as _); let default_shell = &Shell::new(pw.shell); - let shell = options.shell() - .or_else(|| config.shell()) + let shell = config.shell() .unwrap_or(&default_shell); - let mut builder = Command::new(shell.program()); - for arg in shell.args() { + let initial_command = options.command().unwrap_or(&shell); + + let mut builder = Command::new(initial_command.program()); + for arg in initial_command.args() { builder.arg(arg); } |