fuzz-notmuch-gam (445B)
1 #!/usr/bin/env bash 2 set -eo pipefail 3 #slug="" 4 slug=${1:-$(github-project-slug)} 5 if [ $slug != "" ] 6 then 7 slug="and subject:$slug" 8 fi 9 thread=$(notmuch search --format=json from:github $slug and subject:PR and date:month.. | 10 jq -r '.[] | "\(.timestamp) \(.subject)\t\(.thread)"' | 11 sort -nr | 12 datefmt --relative | 13 fzf --no-sort -m | 14 cutt -f2 | 15 xargs -I{} printf 'thread:{}\n') 16 17 echo "notmuch show $thread | mail-prpatch | $(git config core.pager)"