summaryrefslogtreecommitdiff
path: root/mutt-wizard.sh
diff options
context:
space:
mode:
authorBjörn Guth <bjoern.guth@rwth-aachen.de>2018-02-18 16:53:26 +0100
committerBjörn Guth <bjoern.guth@rwth-aachen.de>2018-02-18 16:53:26 +0100
commit90fe2383c0b25d6011405e2863526fcc539998b5 (patch)
treef4bf044a4baff3156ae6507a97e3e35ebd993175 /mutt-wizard.sh
parent458ae95c95671899f9cf4ad611112eecc2102b5e (diff)
Use $fulladdr if no login is given
This should resolve #6.
Diffstat (limited to 'mutt-wizard.sh')
-rwxr-xr-xmutt-wizard.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/mutt-wizard.sh b/mutt-wizard.sh
index 2ed1702..107d1ec 100755
--- a/mutt-wizard.sh
+++ b/mutt-wizard.sh
@@ -109,7 +109,7 @@ EOF
fi
realname=$( dialog --title "Luke's mutt/offlineIMAP autoconfig" --inputbox "Enter the full name you'd like to be identified by on this email account." 10 60 3>&1 1>&2 2>&3 3>&- )
title=$( dialog --title "Luke's mutt/offlineIMAP autoconfig" --inputbox "Give a short, one-word name for this email account that will differentiate it from other email accounts." 10 60 3>&1 1>&2 2>&3 3>&- )
-login=$(dialog --title "Luke's mutt/offlineIMAP autoconfig" --inputbox "Enter your login." 10 60 3>&1 1>&2 2>&3 3>&- )
+login=$(dialog --title "Luke's mutt/offlineIMAP autoconfig" --inputbox "Enter your login for the \"$title\" account.\n(If left empty, the full email address will be used instead.)" 10 60 3>&1 1>&2 2>&3 3>&- )
# Sets the repo type and other variables for the sed regex.
if [[ "$service" == "gmail.com" ]];
then
@@ -119,6 +119,10 @@ if [[ "$service" == "gmail.com" ]];
type="IMAP"
delet="Gmail]\/"
fi
+if [[ -z "$login" ]];
+ then
+ login=$fulladdr
+fi
# The replacements
replacement="
s/\$realname/$realname/g;