1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-04 19:01:44 +00:00

Allow for non-unicode filenames, closes #225

This commit is contained in:
sharkdp
2020-02-12 23:23:49 +01:00
committed by David Peter
parent e98f34b1e8
commit 7779d9f622
6 changed files with 16 additions and 11 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ impl App {
fn files(&self) -> Vec<InputFile> {
self.matches
.values_of("FILE")
.values_of_os("FILE")
.map(|values| {
values
.map(|filename| {
+2 -1
View File
@@ -13,6 +13,7 @@ use std::io;
use std::io::Write;
use std::path::Path;
use std::process;
use std::ffi::OsStr;
use ansi_term::Colour::Green;
use ansi_term::Style;
@@ -160,7 +161,7 @@ fn run() -> Result<bool> {
Ok(true)
} else {
let mut config = app.config()?;
config.files = vec![InputFile::Ordinary(&"cache")];
config.files = vec![InputFile::Ordinary(OsStr::new("cache"))];
run_controller(&config)
}