aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 0cd839c..151b277 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -24,6 +24,8 @@ struct Args {
filter: Option<String>,
#[clap(short, long)]
no_color: bool,
+ #[clap(short = 'F', long)]
+ no_filter: bool,
files: Vec<String>,
}
@@ -36,6 +38,10 @@ impl Args {
&self.filter
}
+ pub fn no_filter(&self) -> bool {
+ self.no_filter
+ }
+
pub fn output(&self) -> BarbOutput {
BarbOutput::new(
!self.body,
@@ -83,7 +89,8 @@ fn main() {
dependencies.dedup();
for dep in dependencies {
- match executor.execute(&dep, &output, args.jq_filter()) {
+ // Always enable filters on dependencies
+ match executor.execute(&dep, &output, args.jq_filter(), false) {
Ok(()) => (),
Err(err) => println!("{}", err),
}
@@ -95,7 +102,7 @@ fn main() {
continue;
}
- match executor.execute(&bfile.unwrap(), &output, args.jq_filter()) {
+ match executor.execute(&bfile.unwrap(), &output, args.jq_filter(), args.no_filter()) {
Ok(()) => (),
Err(err) => println!("{}", err),
}