#!/bin/sh
khard email "$@" | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b"
s="$@"
[ "$#" -gt 0 ] && notmuch address "$s" | grep -i "$s"