diff options
author | speedie <speedie@speedie.site> | 2024-03-18 17:48:15 +0100 |
---|---|---|
committer | speedie <speedie@speedie.site> | 2024-03-18 17:48:15 +0100 |
commit | 11e54213dd16fb3b39be934ce0d465483ddfed80 (patch) | |
tree | 2a54a06f33526443d65666bead55f30a688d782d | |
parent | a8863a750a360bad6759f5f2c4df5d2001b31e18 (diff) |
Don't prompt for password, if the email address already has a saved
password. This is useful if you copy your .password-store
directory from one computer to another.
-rwxr-xr-x | bin/mw | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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() { |