summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rwxr-xr-xbin/mailsync2
-rwxr-xr-xbin/mw10
-rw-r--r--share/mutt-temp2
4 files changed, 10 insertions, 6 deletions
diff --git a/README.md b/README.md
index ba0517e..db4db34 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ https://muttwizard.com/
Get this great stuff without effort:
-- A full-featured and autoconfigured email client on the terminal wibuiltth neomutt
+- A full-featured and autoconfigured email client on the terminal built with neomutt
- Mail stored offline enabling the ability to:
* view and write emails while you're away from
the internet
diff --git a/bin/mailsync b/bin/mailsync
index 3a681f0..7114836 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -74,7 +74,7 @@ syncandnotify() {
[ -z "$MAILSYNC_MUTE" ] &&
for file in $new; do
# Extract and decode subject and sender from mail.
- subject=$(awk '/^Subject: / && ++n == 1,/^.*: / && ++i == 2' "$file" | head -n-1 |
+ subject=$(awk '/^Subject: / && ++n == 1,/^.*: / && ++i == 2' "$file" | sed '$d' |
perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' |
sed 's/^Subject: //' | tr -d '\n\t')
from="$(sed -n "/^From:/ s|From: *|| p" "$file" |
diff --git a/bin/mw b/bin/mw
index 5698f09..2101cdd 100755
--- a/bin/mw
+++ b/bin/mw
@@ -34,7 +34,11 @@ alias mbsync='mbsync -c "$mbsyncrc"'
# mbsync >=1.4.0 requires "Far/Near" rather than "Master/Slave."
mbver="$(mbsync -v)"
mbver="${mbver#* }"
-if [ "${mbver%.*}" >= 1.4 ]; then
+mbver="${mbver%.*}"
+# Comparing two float numbers in bash is a pain in the butt, so we get rid of
+# dots and turn them into nice integers
+mbver="${mbver/\./}"
+if [ "${mbver}" -gt 14 ]; then
master="Far"
slave="Near"
else
@@ -82,7 +86,7 @@ prepmpop() {
}
prepimapnotify() {
- mkdir -p "${imapnotify%/*}" ; envsubst < "$imapnotifytemp" >> "$imapnotify/$fulladdr.conf"
+ mkdir -p "$imapnotify" ; envsubst < "$imapnotifytemp" >> "$imapnotify/$fulladdr.conf"
}
prepmutt() {
@@ -190,7 +194,7 @@ askinfo() {
}
insertpass() {
- printf "%s" "$password" | pass insert -fe "$PASSWORD_STORE_DIR/$passprefix$fulladdr"
+ printf "%s" "$password" | pass insert -fe "$passprefix$fulladdr"
}
errorexit() {
diff --git a/share/mutt-temp b/share/mutt-temp
index 63841ad..82e16ef 100644
--- a/share/mutt-temp
+++ b/share/mutt-temp
@@ -6,7 +6,7 @@ set sendmail = "msmtp -a $fulladdr"
alias me $realname <$fulladdr>
set folder = "$folder"
set header_cache = "$cachedir/$safename/headers"
-set message_cachedir = "$cachedir/$safename/bodies"
+set message_cache_dir = "$cachedir/$safename/bodies"
set mbox_type = Maildir
set hostname = "$hostname"
source $muttshare/switch.muttrc