fix bug in show

This commit is contained in:
timeshifter
2023-01-12 15:30:55 +01:00
parent 0cb0612103
commit 73df8e8f42
2 changed files with 14 additions and 3 deletions
+7 -2
View File
@@ -170,11 +170,16 @@ impl Pacdef {
}
fn show_group_content(&self, groups: &ArgMatches) -> Result<()> {
let groups = groups.get_many::<String>("group").unwrap();
for arg_group in groups {
let mut iter = groups.get_many::<String>("group").unwrap().peekable();
while let Some(arg_group) = iter.next() {
let group = self.groups.iter().find(|g| g.name == *arg_group).unwrap();
println!("{group}");
if iter.peek().is_some() {
println!();
}
}
Ok(())
}