summaryrefslogtreecommitdiff
path: root/mw
diff options
context:
space:
mode:
Diffstat (limited to 'mw')
-rwxr-xr-xmw6
1 files changed, 3 insertions, 3 deletions
diff --git a/mw b/mw
index 8a42743..15cc47f 100755
--- a/mw
+++ b/mw
@@ -8,7 +8,7 @@ namere="^[a-z_][a-z0-9_-]*$" # Regex to ensure viable username
emailre=".\+@.\+\\..\+" # Regex to confirm valid email address
mbsyncrc="$HOME/.mbsyncrc"
[ ! -f "$muttdir/domains.csv" ] || [ ! -d "$bindir" ] && printf "Read the README. Be sure to put the repo in the right place before running.\\n" && exit 1
-gpgemail="$(grep "$emailre" "$creddir/gpgemail")" # Get previously set gpg email address
+gpgemail="$(grep "$emailre" "$creddir/gpgemail" 2>/dev/null)" # Get previously set gpg email address
tmpdir="$(mktemp -d)"
GPG="gpg"; command -v gpg >/dev/null || GPG="gpg2" # Ensure proper gpg command
@@ -129,7 +129,7 @@ addaccount() { \
done
domain="$(echo "$fulladdr" | sed "s/.*@//")"
printf "\\nSearching for \033[32m%s\033[0m in \033[34m\`domains.csv\`\033[0m..." "$domain"
- serverinfo="$(grep "$domain" "$muttdir/domains.csv")"
+ serverinfo="$(grep "$domain" "$muttdir/domains.csv" 2>/dev/null)"
if [ -z "$serverinfo" ]; then
printf "Your email domain is not in mutt-wizard's database yet.\\nmutt-wizard will still autoconfigure everything, but you will have to manually type in your service's IMAP and SMTP server information.\\nYou can usually quickly find this by internet searching for it.\\n"
printf "Insert the IMAP server for your email provider (excluding the port number)\\n\033[36m\t"
@@ -161,7 +161,7 @@ EOF
read -r login
printf "\033[0m"
[ -z "$login" ] && login="$fulladdr"
- grep "i[0-9]" "$muttdir/personal.muttrc" | awk '{print $3}' | sed -e 's/i//g' > "$tmpdir/mutt_used"
+ grep "i[0-9]" "$muttdir/personal.muttrc" 2>/dev/null | awk '{print $3}' | sed -e 's/i//g' > "$tmpdir/mutt_used"
seq 1 9 > "$tmpdir/mutt_all"
idnum=$(diff "$tmpdir/mutt_all" "$tmpdir/mutt_used" | sed -n 2p | awk '{print $2}')
getpass