commit f7d30c4496e1e8afa5a19d92ddb2eaa0c5cb713c
parent 2edf4d083c2c19dc14fd1532d8b7e7837fc56ae0
Author: William Casarin <jb55@jb55.com>
Date: Tue, 17 Nov 2020 09:19:18 -0800
notmuch fuzz updates
Diffstat:
5 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/bin/fuzz-notmuch-archive b/bin/fuzz-notmuch-archive
@@ -2,7 +2,7 @@
set -eou pipefail
-thread_search=$(fuzz-notmuch-query-thread)
+thread_search=$(fuzz-notmuch-query-thread "$@")
threads=$(eval "$thread_search")
fuzz-record-command "res=\$($thread_search) && notmuch tag -inbox \$res"
diff --git a/bin/fuzz-notmuch-query b/bin/fuzz-notmuch-query
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eou pipefail
-query=$(notmuch queries | fuzzer "^query:")
+FUZZ_QUERY=${FUZZ_QUERY:-""}
+query=$(notmuch queries | fuzzer "^query:$FUZZ_QUERY")
echo notmuch search "$@" "$query"
diff --git a/bin/fuzz-notmuch-query-thread b/bin/fuzz-notmuch-query-thread
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -eou pipefail
+export FUZZ_QUERY="$@"
search_query=$(fuzz-notmuch-query --output=summary --format=json)
echo "$search_query | $(fuzz-notmuch-select-threads)"
diff --git a/bin/fuzz-notmuch-threads b/bin/fuzz-notmuch-threads
@@ -2,9 +2,8 @@
set -eou pipefail
-thread_search=$(fuzz-notmuch-query-thread)
+thread_search=$(fuzz-notmuch-query-thread "$@")
-rest="notmuch-show-pretty | less"
thread=$(eval "$thread_search")
-fuzz-record-command "res=\$($thread_search) && notmuch show \$res | $rest"
-echo "notmuch show $thread | $rest"
+fuzz-record-command "thread=\$($thread_search) && notmuch-thread-reader \$thread"
+echo "notmuch-thread-reader $thread"
diff --git a/dotfiles/commands b/dotfiles/commands
@@ -23,7 +23,7 @@ tj tag jump fuzz-tag-jump
gb git branches echo git-bvr
ni notmuch inbox fuzz-notmuch-inbox
nt notmuch threads fuzz-notmuch-threads
-na notmuch archive fuzz-notmuch-archive
+nat notmuch archive fuzz-notmuch-archive
nai notmuch archive inbox fuzz-notmuch-archive-inbox
nq notmuch query fuzz-notmuch-query
z fz echo fz