diff options
author | Zach Day <zachdayz@gmail.com> | 2017-03-14 03:39:26 -0400 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2017-04-18 19:53:31 -0700 |
commit | 2bcd165a78cd20fb6eea0f1ddb0213da7fddf8a1 (patch) | |
tree | 829ba86e4dd881c43f57415a5c59a86bc9fc5f4f /src/tty.rs | |
parent | a3d00f01b136ce95613bb20db9e05bfe9342185b (diff) | |
download | r-alacritty-2bcd165a78cd20fb6eea0f1ddb0213da7fddf8a1.tar.gz r-alacritty-2bcd165a78cd20fb6eea0f1ddb0213da7fddf8a1.tar.bz2 r-alacritty-2bcd165a78cd20fb6eea0f1ddb0213da7fddf8a1.zip |
Add CLI arg for setting working directory
Resolves #478.
Diffstat (limited to 'src/tty.rs')
-rw-r--r-- | src/tty.rs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -235,6 +235,11 @@ pub fn new<T: ToWinsize>(config: &Config, options: &Options, size: T) -> Pty { Ok(()) }); + // Handle set working directory option + if let Some(ref dir) = options.working_dir { + builder.current_dir(dir.as_path()); + } + match builder.spawn() { Ok(child) => { unsafe { |