@@ -74,8 +74,18 @@ impl OutputType {
75 let is_less = pager_path.file_stem() == Some(&OsString::from("less"));
75 let is_less = pager_path.file_stem() == Some(&OsString::from("less"));
78+ let (pager_path, args) = {
79+ let p = std::env::var("ComSpec").unwrap_or_else(|_| "cmd".to_string());
80+ let mut a = args.to_vec();
81+ a.insert(0, pager_path.to_str().unwrap().to_string());
82+ a.insert(0, "/d/c".to_string());
86+ let mut p = Command::new(&pager_path);
77 let mut process = if is_less {
88 let mut process = if is_less {
78− let mut p = Command::new(&pager_path);
79 if args.is_empty() || replace_arguments_to_less {
89 if args.is_empty() || replace_arguments_to_less {
80 p.arg("--RAW-CONTROL-CHARS");
90 p.arg("--RAW-CONTROL-CHARS");
81 if quit_if_one_screen {
91 if quit_if_one_screen {
@@ -106,7 +116,6 @@ impl OutputType {
106 p.env("LESSCHARSET", "UTF-8");
116 p.env("LESSCHARSET", "UTF-8");
109− let mut p = Command::new(&pager_path);
110 p.args(args);
119 p.args(args);