From 36c441b8c2c411554af8539f57fb86941270bb6d Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Tue, 4 Jul 2023 14:15:00 +0200 Subject: [PATCH] feat: respect backup list filter option --- src/cli/backup.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cli/backup.rs b/src/cli/backup.rs index 4f64882..a77eae9 100644 --- a/src/cli/backup.rs +++ b/src/cli/backup.rs @@ -131,7 +131,12 @@ impl BackupListArgs { pub fn run(&self, cli: &Cli) -> io::Result<()> { let meta = cli.meta()?; - for (name, manager) in meta.managers().iter() { + // A bit scuffed? Sure + for (name, manager) in meta + .managers() + .iter() + .filter(|(name, _)| self.layer.is_none() || &self.layer.as_ref().unwrap() == name) + { println!("{}", name); for chain in manager.chains().iter().filter(|c| !c.is_empty()) {