diff --git a/src/cmd/cat.rs b/src/cmd/cat.rs index 34b3a374c..b730d8eb4 100644 --- a/src/cmd/cat.rs +++ b/src/cmd/cat.rs @@ -97,8 +97,13 @@ pub fn run(argv: &[&str]) -> CliResult<()> { impl Args { #[inline] fn configs(&self) -> CliResult> { - util::many_configs(&self.arg_input, self.flag_delimiter, self.flag_no_headers) - .map_err(From::from) + util::many_configs( + &self.arg_input, + self.flag_delimiter, + self.flag_no_headers, + self.flag_flexible, + ) + .map_err(From::from) } fn cat_rows(&self) -> CliResult<()> { diff --git a/src/cmd/headers.rs b/src/cmd/headers.rs index 0fa784468..65e4ea9c0 100644 --- a/src/cmd/headers.rs +++ b/src/cmd/headers.rs @@ -45,7 +45,7 @@ struct Args { pub fn run(argv: &[&str]) -> CliResult<()> { let args: Args = util::get_args(USAGE, argv)?; - let configs = util::many_configs(&args.arg_input, args.flag_delimiter, true)?; + let configs = util::many_configs(&args.arg_input, args.flag_delimiter, true, false)?; let num_inputs = configs.len(); let mut headers: Vec> = vec![]; diff --git a/src/util.rs b/src/util.rs index c1c353f83..52ac81b17 100644 --- a/src/util.rs +++ b/src/util.rs @@ -410,6 +410,7 @@ pub fn many_configs( inps: &[String], delim: Option, no_headers: bool, + flexible: bool, ) -> Result, String> { let mut inps = inps.to_vec(); if inps.is_empty() { @@ -421,6 +422,7 @@ pub fn many_configs( Config::new(&Some(p)) .delimiter(delim) .no_headers(no_headers) + .flexible(flexible) }) .collect::>(); errif_greater_one_stdin(&confs)?;