summaryrefslogtreecommitdiff
path: root/bin/mw
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mw')
-rwxr-xr-xbin/mw5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/mw b/bin/mw
index 6d7f669..a143f17 100755
--- a/bin/mw
+++ b/bin/mw
@@ -60,13 +60,13 @@ checkbasics() {
command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2"
PASSWORD_STORE_DIR="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
[ -r "$PASSWORD_STORE_DIR/.gpg-id" ] || {
- echo "First run \`pass init <yourgpgemail>\` to set up a password archive."
+ echo "First run \`pass init mail/mutt/<yourgpgemail>\` to set up a password archive."
echo "(If you don't already have a GPG key pair, first run \`$GPG --full-generate-key\`.)"
exit 1
}
}
-getaccounts() { accounts="$(find -L "$accdir" -type f 2>/dev/null | grep -o "\S*.muttrc" | sed "s|.*/\([0-9]-\)*||;s/\.muttrc$//" | nl)"; }
+getaccounts() { accounts="$(find -L "$accdir" -type f 2>/dev/null | grep -o "\S*.muttrc" | sed "s|.*/\([0-9]-\)*||;s/\.muttrc$//" | nl -v 0)"; }
list() { getaccounts && [ -n "$accounts" ] && echo "$accounts" || exit 1; }
@@ -255,6 +255,7 @@ getboxes() {
mailboxes="$(printf "%s" "$mailboxes" | sed '/^$/d')"
fi
[ "$type" = "pop" ] && mailboxes="INBOX"
+ idnum="-1"
for x in $(
sed -n "/^macro.* i[0-9] / s/\(^macro.* i\| .*\)//gp " "$muttrc" 2>/dev/null | sort -u
echo 0