aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/cli.rs
diff options
context:
space:
mode:
authorDavid Hewitt <1939362+davidhewitt@users.noreply.github.com>2020-01-02 11:49:27 +0000
committerChristian Duerr <contact@christianduerr.com>2020-01-02 11:49:27 +0000
commitf632919134414e31ffd3ae9b5732d673deb0adf5 (patch)
tree59e74ceabba1d08a5d5966502dda113b11143fc2 /alacritty/src/cli.rs
parent77acb26d7328f678b26c8aff2ee5706d78949c44 (diff)
downloadr-alacritty-f632919134414e31ffd3ae9b5732d673deb0adf5.tar.gz
r-alacritty-f632919134414e31ffd3ae9b5732d673deb0adf5.tar.bz2
r-alacritty-f632919134414e31ffd3ae9b5732d673deb0adf5.zip
Clean up Windows PTY string handling
Removes widestring and dunce dependencies, reduces some code duplication and corrects a few typos.
Diffstat (limited to 'alacritty/src/cli.rs')
-rw-r--r--alacritty/src/cli.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/alacritty/src/cli.rs b/alacritty/src/cli.rs
index e3fb8dcf..6f7f8a68 100644
--- a/alacritty/src/cli.rs
+++ b/alacritty/src/cli.rs
@@ -254,12 +254,12 @@ impl Options {
}
pub fn into_config(self, mut config: Config) -> Config {
- config.set_live_config_reload(
- self.live_config_reload.unwrap_or_else(|| config.live_config_reload()),
- );
- config.set_working_directory(
- self.working_dir.or_else(|| config.working_directory().to_owned()),
- );
+ if let Some(lcr) = self.live_config_reload {
+ config.set_live_config_reload(lcr);
+ }
+ if let Some(wd) = self.working_dir {
+ config.set_working_directory(Some(wd));
+ }
config.shell = self.command.or(config.shell);
config.hold = self.hold;