diff options
author | Luke Smith <luke@lukesmith.xyz> | 2018-02-18 11:01:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-18 11:01:31 -0500 |
commit | 0b999a2a3cada21ce5e563660fae24c945f54e36 (patch) | |
tree | 9e1f7b5cbfb71c9dfe3ad2fc216c48bc4f611cec /mutt-wizard.sh | |
parent | a4495298dcfe39e69a15843275aed161daed1aba (diff) | |
parent | 90fe2383c0b25d6011405e2863526fcc539998b5 (diff) |
Merge pull request #11 from scattenlaeufer/login_name
Ask for a login name during account creation
Diffstat (limited to 'mutt-wizard.sh')
-rwxr-xr-x | mutt-wizard.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mutt-wizard.sh b/mutt-wizard.sh index 1e321c3..1625267 100755 --- a/mutt-wizard.sh +++ b/mutt-wizard.sh @@ -109,6 +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 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 @@ -118,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; @@ -128,8 +133,8 @@ replacement=" s/\$smtp/$smtp/g; s/\$sport/$sport/g; s/\$type/$type/g; + s/\$login/$login/g; /$delet/d" - # Gets the first unused shortcut number in the muttrc and puts it in $idnum. cat "$muttdir"personal.muttrc | grep i[0-9] | awk '{print $3}' | sed -e 's/i//g' > /tmp/mutt_used echo -e "1\n2\n3\n4\n5\n6\n7\n8\n9" > /tmp/mutt_all_possible |