From f53e7377dcbc27765e6fbf69719e7bae7090d5a3 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 17 Dec 2019 15:49:05 -0800 Subject: [PATCH] Allow highlight to command to take glob patterns --- cli/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 5798fe57..e76c2e18 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -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)? {