Allow highlight to command to take glob patterns

This commit is contained in:
Max Brunsfeld 2019-12-17 15:49:05 -08:00
parent 6c5adb7072
commit f53e7377dc

View file

@ -245,7 +245,7 @@ fn run() -> error::Result<()> {
loader.find_all_languages(&config.parser_directories)?;
let time = matches.is_present("time");
let paths = matches.values_of("path").unwrap().into_iter();
let paths = collect_paths(matches.values_of("path").unwrap())?;
let html_mode = matches.is_present("html");
if html_mode {
println!("{}", highlight::HTML_HEADER);
@ -262,7 +262,7 @@ fn run() -> error::Result<()> {
}
for path in paths {
let path = Path::new(path);
let path = Path::new(&path);
let (language, language_config) = match language_config {
Some(v) => v,
None => match loader.language_configuration_for_file_name(path)? {