tags keys and other improvements

This commit is contained in:
2026-03-16 09:39:08 +01:00
parent 8a0c8bc2d7
commit 28aca1a82b
7 changed files with 232 additions and 84 deletions

View File

@@ -1,10 +1,16 @@
# Wrapper around notmuch
# notmuch new
# This is used for updating the notmuch database
nm_new() {
$NOTMUCH new
}
# Print the message id of the last message within a thread.
# @argument $1: thread id
nm_last_message_in_thread() {
# TODO: We may be smarter here that just incorporating excluded messages
$NOTMUCH search --output=messages --offset=-1 --exclude=false thread:"$1" | sed 's/^...//'
$NOTMUCH search --output=messages --offset=-1 thread:"$1" | sed 's/^...//'
}
# Print the header of a message (with trailing empty line)
@@ -39,3 +45,9 @@ nm_message_get_part() {
nm_tag() {
$NOTMUCH tag "$1" "$2"
}
# Get all files, also of excluded matches
# @argument $1: query
nm_files_all() {
$NOTMUCH search --output=files --exclude=false "$1"
}