mutt-wizard

fork of Luke Smiths mutt-wizard
git clone git://git.jakekoroman.com/mutt-wizard
Log | Files | Refs | README | LICENSE

commit 2698a4358c4747033b9c4dde3142d898e8c2004f
parent 7c980ec6fbc4e51f3fa663a541de4ff5a4f6587f
Author: Jackson Law <178053+jlaw@users.noreply.github.com>
Date:   Sat, 18 Apr 2020 07:47:32 -0700

fix: Support mbsync options passed to mailsync (#414)


Diffstat:
Mbin/mailsync | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/mailsync b/bin/mailsync @@ -28,7 +28,7 @@ fi # Check account for new mail. Notify if there is new content. syncandnotify() { acc="$(echo "$account" | sed "s/.*\///")" - mbsync "$acc" + mbsync $opts "$acc" new=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "$HOME/.config/mutt/.mailsynclastrun" 2> /dev/null) newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) if [ "$newcount" -gt "0" ]; then @@ -46,6 +46,9 @@ syncandnotify() { if [ "$#" -eq "0" ]; then accounts="$(awk '/^Channel/ {print $2}' "$HOME/.mbsyncrc")" else + for arg in "$@"; do + [ "${arg%${arg#?}}" = '-' ] && opts="${opts:+${opts} }${arg}" && shift 1 + done accounts=$* fi