summaryrefslogtreecommitdiff
path: root/bin/mailsync
diff options
context:
space:
mode:
authorDov Salomon <dsalomon@nyu.edu>2019-04-30 20:38:53 -0400
committerDov Salomon <dsalomon@nyu.edu>2019-04-30 20:38:53 -0400
commitcff2554231b5dce228795acaf02b5a69cb7d362e (patch)
tree420fbb10953da0c98fabf6a67c8b9e4d88e374fc /bin/mailsync
parent9f489eefc277651e4dc70ec7d7c06b4396835175 (diff)
Mailsync: only pass -a to mbsync when no args
If -a is passed along with "$@", mailsync will sync all mailboxes even if only a single channel is passed in with "$@". This breaks the semantics of the `o` macro in mutt which should only sync the current mailbox that is currently being viewed in mutt.
Diffstat (limited to 'bin/mailsync')
-rwxr-xr-xbin/mailsync7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/mailsync b/bin/mailsync
index 620557c..a85bdf9 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -18,7 +18,12 @@ echo " 🔃" > /tmp/imapsyncicon_$USER
pkill -RTMIN+12 i3blocks
# Run mbsync. You can feed this script different settings.
-mbsync -a "$@"
+if [ $# -eq 0 ]; then
+ mbsync -a
+else
+ mbsync "$@"
+fi
+
rm -f /tmp/imapsyncicon_$USER
pkill -RTMIN+12 i3blocks