From 800b67ec5d988d1e4d6b66c068f17ab36163785641e9d269004eab316845e5c7 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 14 Mar 2024 15:51:57 +0300 Subject: [PATCH] Filter by tags --- list | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/list b/list index 13cdc77..4e7fa51 100755 --- a/list +++ b/list @@ -3,9 +3,24 @@ root=$0:h:a . $root/lib.zsh.rc +tagsOur=($@) + for issue (issues/**/created) { issue=$issue:h issue=${issue#issues/} + + tagsTheir=(`$root/tag-list $issue`) + tagsFound=0 + for our ($tagsOur) { + for their ($tagsTheir) { + if [[ $their =~ $our ]] ; then + tagsFound=$(( $tagsFound + 1 )) + break + fi + } + } + [[ $tagsFound -eq ${#tagsOur} ]] || continue + print -n `cat issues/$issue/created`\\t$issue\\t - print `$root/tag-list $issue` + print $tagsTheir } | sort -r -- 2.44.0