aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/main.rs b/src/main.rs
index 33b3c45..cb67968 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -9,7 +9,6 @@ use std::str::FromStr;
use anyhow::{anyhow, Error, Result};
use chrono::{DateTime, TimeZone, Utc};
use colored::Colorize;
-use itertools::Itertools;
use log::debug;
use regex::Regex;
use rustyline::Editor;
@@ -284,17 +283,7 @@ fn single(opt: &Opt) -> Result<()> {
return grep(opt, &*maybe_filter?);
}
- let expr_string = opt
- .expression
- .iter()
- .map(|part| {
- if part.contains(' ') {
- format!(r#""{}""#, part)
- } else {
- part.into()
- }
- })
- .join(" ");
+ let expr_string = fexpr::requote(&opt.expression);
let filter = build_filter(&expr_string)?;
grep(&opt, &*filter)?;
Ok(())