|
|
@ -9,7 +9,6 @@ pub struct CmdLineSettings {
|
|
|
|
pub neovim_args: Vec<String>,
|
|
|
|
pub neovim_args: Vec<String>,
|
|
|
|
// Command-line arguments only
|
|
|
|
// Command-line arguments only
|
|
|
|
pub geometry: Dimensions,
|
|
|
|
pub geometry: Dimensions,
|
|
|
|
pub verbosity: u64,
|
|
|
|
|
|
|
|
pub log_to_file: bool,
|
|
|
|
pub log_to_file: bool,
|
|
|
|
pub no_fork: bool,
|
|
|
|
pub no_fork: bool,
|
|
|
|
pub remote_tcp: Option<String>,
|
|
|
|
pub remote_tcp: Option<String>,
|
|
|
@ -33,7 +32,6 @@ impl Default for CmdLineSettings {
|
|
|
|
neovim_args: vec![],
|
|
|
|
neovim_args: vec![],
|
|
|
|
// Command-line arguments only
|
|
|
|
// Command-line arguments only
|
|
|
|
geometry: DEFAULT_WINDOW_GEOMETRY,
|
|
|
|
geometry: DEFAULT_WINDOW_GEOMETRY,
|
|
|
|
verbosity: 0,
|
|
|
|
|
|
|
|
log_to_file: false,
|
|
|
|
log_to_file: false,
|
|
|
|
no_fork: false,
|
|
|
|
no_fork: false,
|
|
|
|
remote_tcp: None,
|
|
|
|
remote_tcp: None,
|
|
|
@ -72,12 +70,6 @@ pub fn handle_command_line_arguments(args: Vec<String>) -> Result<(), String> {
|
|
|
|
.help("Specify Arguments to pass down to neovim"),
|
|
|
|
.help("Specify Arguments to pass down to neovim"),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
// Command-line arguments only
|
|
|
|
// Command-line arguments only
|
|
|
|
.arg(
|
|
|
|
|
|
|
|
Arg::with_name("verbosity")
|
|
|
|
|
|
|
|
.short("v")
|
|
|
|
|
|
|
|
.multiple(true)
|
|
|
|
|
|
|
|
.help("Increase verbosity level (repeatable up to 4 times; implies --nofork)"),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.arg(
|
|
|
|
.arg(
|
|
|
|
Arg::with_name("geometry")
|
|
|
|
Arg::with_name("geometry")
|
|
|
|
.long("geometry")
|
|
|
|
.long("geometry")
|
|
|
@ -170,10 +162,9 @@ pub fn handle_command_line_arguments(args: Vec<String>) -> Result<(), String> {
|
|
|
|
// Pass through arguments
|
|
|
|
// Pass through arguments
|
|
|
|
neovim_args,
|
|
|
|
neovim_args,
|
|
|
|
// Command-line arguments only
|
|
|
|
// Command-line arguments only
|
|
|
|
verbosity: matches.occurrences_of("verbosity"),
|
|
|
|
|
|
|
|
geometry: parse_window_geometry(matches.value_of("geometry").map(|i| i.to_owned()))?,
|
|
|
|
geometry: parse_window_geometry(matches.value_of("geometry").map(|i| i.to_owned()))?,
|
|
|
|
log_to_file: matches.is_present("log_to_file"),
|
|
|
|
log_to_file: matches.is_present("log_to_file"),
|
|
|
|
no_fork: matches.is_present("nofork") || matches.is_present("verbosity"),
|
|
|
|
no_fork: matches.is_present("nofork"),
|
|
|
|
remote_tcp: matches.value_of("remote_tcp").map(|i| i.to_owned()),
|
|
|
|
remote_tcp: matches.value_of("remote_tcp").map(|i| i.to_owned()),
|
|
|
|
wsl: matches.is_present("wsl"),
|
|
|
|
wsl: matches.is_present("wsl"),
|
|
|
|
// Command-line flags with environment variable fallback
|
|
|
|
// Command-line flags with environment variable fallback
|
|
|
|