From 30c4647c98e2e04b86ef6189bf7974b1a3bc20bd Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 24 Dec 2020 20:40:17 -0500 Subject: [PATCH] don't readd same account. fix #558 --- bin/mw | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/mw b/bin/mw index d179368..61e7592 100755 --- 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