macos specific filename with space check

main
“Dinesh 2 years ago
parent febee7b85f
commit 83edde8103

@ -170,12 +170,17 @@ pub fn handle_command_line_arguments(args: Vec<String>) -> Result<(), String> {
neovim_args.push("-p".to_owned()); neovim_args.push("-p".to_owned());
} }
if cfg!(target_os = "macos") {
// escape filepath which contain spaces
neovim_args.extend::<Vec<String>>( neovim_args.extend::<Vec<String>>(
files_to_open files_to_open
.iter() .iter()
.map(|file| file.replace(" ", "\\ ")) .map(|file| file.replace(" ", "\\ "))
.collect(), .collect(),
); );
} else {
neovim_args.extend::<Vec<String>>(files_to_open);
}
/* /*
* Integrate Environment Variables as Defaults to the command-line ones. * Integrate Environment Variables as Defaults to the command-line ones.

Loading…
Cancel
Save