commit 30c4647c98e2e04b86ef6189bf7974b1a3bc20bd
parent 456d02d1ee0ab196ac256b91c9ac86a01f3c0bb6
Author: Luke Smith <luke@lukesmith.xyz>
Date: Thu, 24 Dec 2020 20:40:17 -0500
don't readd same account. fix #558
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/bin/mw b/bin/mw
@@ -164,6 +164,8 @@ askinfo() { \
echo "\`$fulladdr\` is not a valid email address. Please retype the address:"
read -r fulladdr
done
+ grep -q "Channel\s*$fulladdr$" "$mbsyncrc" &&
+ { echo "$fulladdr has already been added" && exit 1 ;}
{ [ -z "$imap" ] || [ -z "$smtp" ] ;} && parsedomains
[ -z "$imap" ] && echo "Give your email server's IMAP address (excluding the port number):" &&
read -r imap