Skip to content

Instantly share code, notes, and snippets.

@keegancsmith
Created February 15, 2021 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keegancsmith/0277678a822f7a1c1c2823c2e61b3992 to your computer and use it in GitHub Desktop.
Save keegancsmith/0277678a822f7a1c1c2823c2e61b3992 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
cmd=${1-urls}
query='tag:gh and tag:inbox body:"Reply to this email directly or view it on GitHub"'
case "$cmd" in
"urls")
notmuch show "$query" | egrep -o '^https://github\.com.*/(issues|pull)/[0-9]+' | sort | uniq
;;
"done")
notmuch tag -inbox -unread "$query"
;;
*)
echo "Unknown command $cmd"
echo "USAGE: notmuch github urls|done"
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment