local keyid="$($GPG_LIST_KEYS --with-fingerprint $1 2> /dev/null | grep ^fpr | cut -d : -f 10)"
# check if its a valid email
- if ! ValidEmail $1; then
+ if ! CheckValidEmail $1; then
echo >&2 "unsub: \"$1\" is not an email address."
return_code=1
# check if user is trying to unsubscribe the list key
local key
local keys
+ local keyid
if [ "$1" == "help" ]; then
echo "usage: info [all|email|help]"
fi
for key in keys; do
- $GPG --list-keys $key
+ keyid="$($GPG_LIST_KEYS --with-fingerprint $1 2> /dev/null | grep ^fpr | cut -d : -f 10)"
+ if [ ! -z "$keyid" ]; then
+ $GPG --list-keys $key
+ fi
done
return $?