summaryrefslogtreecommitdiffstats
path: root/src/command/search.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2021-05-09 19:01:21 +0100
committerGitHub <noreply@github.com>2021-05-09 18:01:21 +0000
commitbd4db1fa038bc338f2b608858c2ffd3c25e0abe7 (patch)
tree7ea9ee7ffde598d4a274821eeb61d4d69e0059d1 /src/command/search.rs
parentd39e3cb47915b64fb2035070012347fff1ddbcc4 (diff)
Allow listing or searching with only the command as output (#89)
Should be useful for using other tools, such as FZF
Diffstat (limited to 'src/command/search.rs')
-rw-r--r--src/command/search.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/command/search.rs b/src/command/search.rs
index f49f16e2..b45e366a 100644
--- a/src/command/search.rs
+++ b/src/command/search.rs
@@ -329,6 +329,7 @@ pub async fn run(
exclude_cwd: Option<String>,
before: Option<String>,
after: Option<String>,
+ cmd_only: bool,
query: &[String],
db: &mut (impl Database + Send + Sync),
) -> Result<()> {
@@ -412,7 +413,7 @@ pub async fn run(
.map(std::borrow::ToOwned::to_owned)
.collect();
- super::history::print_list(&results, human);
+ super::history::print_list(&results, human, cmd_only);
}
Ok(())