[-- Attachment #1.1: Type: text/plain, Size: 218 bytes --] Hello, I'm trying to document the tags I'm using for notmuch and make sure I have not introduced duplication or typos. So I would like to list all the tags I've used. Is there a way to do it? Thanks, Alan [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 528 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --]
* Alan Schmitt:
> I'm trying to document the tags I'm using for notmuch [...]
The following should get you started (untested, from memory):
notmuch dump | gawk -F '--' '{print $1}' | sort -u
Feel free to add some more AWK magic instead of the "sort -u" to
group/count by tag name.
-Ralph
Alan Schmitt writes:
> I would like to list all
> the tags I've used. Is there a way to do it?
notmuch search --output=tags '*'
Kim Minh.
* Kim Minh Kaplan:
> notmuch search --output=tags '*'
That's much nicer than my idea. Thanks.
-Ralph
[-- Attachment #1.1: Type: text/plain, Size: 492 bytes --] On 2020-11-20 15:33, Kim Minh Kaplan <kimminh.kaplan+nomuch@afnic.fr> writes: > Alan Schmitt writes: > >> I would like to list all >> the tags I've used. Is there a way to do it? > > notmuch search --output=tags '*' Thanks a lot Ralph and Kim. For the record, I refined Ralph's solution to: notmuch dump | tail -n +2 | gawk -F '--' '{print $1}' | gawk -F ' ' '{ for(i=1; i<=NF; i+=1) {printf "%s\n", $i;}}' | sort -u which I can now happily throw away ;) Best, Alan [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 528 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --]