commit c3956cd8059cd033f1e9b27ac0e2baf3dbff8f9d parent 31936a0bc2dbe5ec5b1e1aeb6cae3feaa6274df3 Author: William Casarin <jb55@jb55.com> Date: Mon, 16 Nov 2020 18:39:03 -0800 notmuch-thread-reader Diffstat:
M | bin/fuzz-notmuch-inbox | | | 9 | ++++----- |
A | bin/notmuch-thread-reader | | | 8 | ++++++++ |
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/bin/fuzz-notmuch-inbox b/bin/fuzz-notmuch-inbox @@ -1,7 +1,6 @@ #!/usr/bin/env bash set -eou pipefail -threads_cmd="notmuch search --format=json ${@:-query:inbox} | $(fuzz-notmuch-select-threads)" -threads=$(eval "$threads_cmd") -rest="notmuch-show-pretty | less" -fuzz-record-command "threads=\$($threads_cmd) && notmuch show \$threads | $rest" -echo "notmuch show $threads | $rest" +thread_cmd="notmuch search --format=json ${@:-query:inbox} | $(fuzz-notmuch-select-threads)" +thread=$(eval "$thread_cmd") +fuzz-record-command "thread=\$($thread_cmd) && notmuch-thread-reader \$thread" +echo "notmuch-thread-reader $thread" diff --git a/bin/notmuch-thread-reader b/bin/notmuch-thread-reader @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -eo pipefail +if [ -z $1 ]; then + printf "usage: notmuch-thread-reader <thread-id>\n" + exit 1 +fi +notmuch show $1 | notmuch-show-pretty > /tmp/$1 +lessr /tmp/$1