diff --git a/address b/address index 4976aa2..3d4d4de 100755 --- a/address +++ b/address @@ -2,4 +2,4 @@ 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 "$@" | grep -i "$s" +[ "$#" -gt 0 ] && notmuch address "$s" | grep -i "$s" diff --git a/emails b/emails new file mode 100755 index 0000000..aab9db4 --- /dev/null +++ b/emails @@ -0,0 +1,5 @@ +#!/bin/sh + +# We setup xauthority file to display stuff +xauthority="$(cat ~/.Xauthority)" +exec sudo -u emails sh -c "echo \"$xauthority\" > ~/.Xauthority && . ~/.bashrc && exec aerc"