summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2021-01-06 21:38:25 -0500
committerLuke Smith <luke@lukesmith.xyz>2021-01-06 21:38:25 -0500
commit16de5dc350d06cd45338271a2286c0629ef20435 (patch)
tree8e15a3c7a8029e9414f158e0ff3ab1f77e9791db
parentf83c45689b21fccb917fdb4c555280eaf19ef78f (diff)
don't ask realname if not given; assume userid
-rw-r--r--README.md2
-rwxr-xr-xbin/mw3
2 files changed, 2 insertions, 3 deletions
diff --git a/README.md b/README.md
index 46c4a36..a68e298 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@ The mutt-wizard is run with the command `mw`. Once everything is setup, you'll u
#### Providing arguments
- `-u` -- Give an account username if different from the email address.
-- `-n` -- A real name to be used by the account. Put in quotations if multiple words
+- `-n` -- A real name to be used by the account. Put in quotations if multiple words.
- `-i` -- IMAP server address
- `-I` -- IMAP server port (otherwise assumed to be 993)
- `-s` -- SMTP server address
diff --git a/bin/mw b/bin/mw
index 9950fae..0c00e53 100755
--- a/bin/mw
+++ b/bin/mw
@@ -180,8 +180,7 @@ askinfo() { \
[ -z "$smtp" ] && echo "Give your email server's SMTP address (excluding the port number):" &&
read -r smtp
[ "$sport" = 465 ] && tlsline="tls_starttls off"
- [ -z "$realname" ] && echo "Give the name you would like to be identified by on the email account:" &&
- read -r realname
+ [ -z "$realname" ] && realname="${fulladdr%%@*}"
login="${login:-$fulladdr}"
if [ -n "${password+x}" ]; then
createpass