about summary refs log tree commit diff stats
path: root/pkgs/by-name/ts/tskm/src/interface/input/handle.rs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ts/tskm/src/interface/input/handle.rs')
-rw-r--r--pkgs/by-name/ts/tskm/src/interface/input/handle.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/by-name/ts/tskm/src/interface/input/handle.rs b/pkgs/by-name/ts/tskm/src/interface/input/handle.rs
index 09827fca..0469870c 100644
--- a/pkgs/by-name/ts/tskm/src/interface/input/handle.rs
+++ b/pkgs/by-name/ts/tskm/src/interface/input/handle.rs
@@ -126,8 +126,16 @@ pub fn handle(command: InputCommand) -> Result<()> {
             info!("Waiting for firefox to stop");
             handle.join().expect("Should be joinable")?;
         }
-        InputCommand::List => {
-            for url in Input::all()? {
+        InputCommand::List { tags } => {
+            let mut tag_set = HashSet::with_capacity(tags.len());
+            for tag in tags {
+                tag_set.insert(tag);
+            }
+
+            for url in Input::all()?
+                .iter()
+                .filter(|input| tag_set.is_subset(&input.tags))
+            {
                 println!("{url}");
             }
         }