Skip to content
Myr

Adds path separator checking and hint for automatic `/` expansion for some windows shells, eg., msys

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kaleb Olson · committed by David Peter · parent ab81cad · Browse files · 1 file+12 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+12 added−0 removed

  • other:+12 added−0 removed

1 file+12 added−0 removed

modified:src/main.rs+12 added
174 unmodified lines
175176 let path_separator = matches177 .value_of("path-separator")178 .map_or_else(filesystem::default_path_separator, |s| Some(s.to_owned()));179 if let Some(sep) = path_separator.clone() {180 if sep.len() > 1 {181 return Err(anyhow!(182 "A path separator must be exactly one byte, but \183 the given separator is {} bytes: {}\n\184 In some shells on Windows '/' is automatically \185 expanded. Use '//' instead.",186 sep.len(),187 sep188 ));189 };190 };191192 let ls_colors = if colored_output {193 Some(LsColors::from_env().unwrap_or_else(|| LsColors::from_string(DEFAULT_LS_COLORS)))194 } else {
292 unmodified lines