citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit d445d2295652a9a5eb3936151f70824c85ff0831
parent 1b555a3ed52dde5300a5e240385b1c958528a9ef
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 14 Nov 2020 18:21:40 -0800

fuzz: simple inbox cmd

Diffstat:
Abin/fuzz-notmuch-inbox | 7+++++++
Mbin/fuzz-notmuch-query-thread | 2+-
Abin/fuzz-notmuch-select-threads | 3+++
Mdotfiles/commands | 5++---
4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/bin/fuzz-notmuch-inbox b/bin/fuzz-notmuch-inbox @@ -0,0 +1,7 @@ +#!/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" diff --git a/bin/fuzz-notmuch-query-thread b/bin/fuzz-notmuch-query-thread @@ -2,4 +2,4 @@ set -eou pipefail search_query=$(fuzz-notmuch-query --output=summary --format=json) -echo "$search_query | notmuch-thread-table | $FUZZER -m | cutt -f4 | sed 's,^,thread:,g'" +echo "$search_query | $(fuzz-notmuch-select-threads)" diff --git a/bin/fuzz-notmuch-select-threads b/bin/fuzz-notmuch-select-threads @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -eou pipefail +echo "notmuch-thread-table | $FUZZER -m | cutt -f4 | sed 's,^,thread:,g'" diff --git a/dotfiles/commands b/dotfiles/commands @@ -20,8 +20,7 @@ h run fuzz hist fuzz-run-hist H get fuzz hist fuzz-get-hist tj tag jump fuzz-tag-jump gb git branches echo git-bvr +ni notmuch inbox fuzz-notmuch-inbox nt notmuch threads fuzz-notmuch-threads -nm notmuch messages fuzz-notmuch-messages -nat notmuch archive threads fuzz-notmuch-archive -nam notmuch archive messages fuzz-notmuch-archive-messages +na notmuch archive threads fuzz-notmuch-archive nq notmuch query fuzz-notmuch-query