summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rwxr-xr-xbin/mw6
2 files changed, 5 insertions, 3 deletions
diff --git a/README.md b/README.md
index 76e2461..07995cf 100644
--- a/README.md
+++ b/README.md
@@ -209,6 +209,8 @@ To give you an example of the interface, here's an idea:
applications requires turning off two-factor authentication and this will
circumvent that. You might also need to manually "Enable IMAP" in the
settings.
+ To create an App Password for your Google account,
+ you can directly visit the [App Passwords](https://myaccount.google.com/apppasswords) page in your Google Account settings.
- If you have a university email or enterprise-hosted email for work, there
might be other hurdles or two-factor authentication you have to jump through.
Some, for example, will want you to create a separate IMAP password, etc.
diff --git a/bin/mw b/bin/mw
index cdb7856..44086be 100755
--- a/bin/mw
+++ b/bin/mw
@@ -173,11 +173,11 @@ askinfo() {
[ -z "$passprefix" ] && passprefix=""
hostname="${fulladdr#*@}"
login="${login:-$fulladdr}"
- if [ -n "${password+x}" ]; then
+ if [ -n "${password+x}" ] && [ ! -f "$PASSWORD_STORE_DIR/$passprefix$fulladdr.gpg" ]; then
insertpass
- else
+ elif [ ! -f "$PASSWORD_STORE_DIR/$passprefix$fulladdr.gpg" ]; then
getpass
- fi
+ fi
}
insertpass() {