diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2020-06-05 01:10:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-05 01:10:31 +0300 |
commit | f99220f01553c6c9d36e1f4ce01c007f4d4d4cb5 (patch) | |
tree | a61843b8ffe5fc25cc3a35157bc1a4346f37d40b /alacritty/src/cli.rs | |
parent | 1e32e5a5154a2e765ca0b3ab8e50e4c01bbe5d18 (diff) | |
download | r-alacritty-f99220f01553c6c9d36e1f4ce01c007f4d4d4cb5.tar.gz r-alacritty-f99220f01553c6c9d36e1f4ce01c007f4d4d4cb5.tar.bz2 r-alacritty-f99220f01553c6c9d36e1f4ce01c007f4d4d4cb5.zip |
Refactor Shell, Command, and Launcher to share impl
Diffstat (limited to 'alacritty/src/cli.rs')
-rw-r--r-- | alacritty/src/cli.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alacritty/src/cli.rs b/alacritty/src/cli.rs index 5f6b7804..f7c591e6 100644 --- a/alacritty/src/cli.rs +++ b/alacritty/src/cli.rs @@ -18,7 +18,7 @@ use std::path::PathBuf; use clap::{crate_authors, crate_description, crate_name, crate_version, App, Arg}; use log::{self, error, LevelFilter}; -use alacritty_terminal::config::{Delta, Dimensions, Shell, DEFAULT_NAME}; +use alacritty_terminal::config::{Delta, Dimensions, Program, DEFAULT_NAME}; use alacritty_terminal::index::{Column, Line}; use crate::config::Config; @@ -41,7 +41,7 @@ pub struct Options { pub class: Option<String>, pub embed: Option<String>, pub log_level: LevelFilter, - pub command: Option<Shell<'static>>, + pub command: Option<Program>, pub hold: bool, pub working_dir: Option<PathBuf>, pub config: Option<PathBuf>, @@ -243,9 +243,9 @@ impl Options { // The following unwrap is guaranteed to succeed. // If `command` exists it must also have a first item since // `Arg::min_values(1)` is set. - let command = String::from(args.next().unwrap()); + let program = String::from(args.next().unwrap()); let args = args.map(String::from).collect(); - options.command = Some(Shell::new_with_args(command, args)); + options.command = Some(Program::WithArgs { program, args }); } if matches.is_present("hold") { |