diff options
author | Dov Salomon <dsalomon@nyu.edu> | 2019-04-30 20:38:53 -0400 |
---|---|---|
committer | Dov Salomon <dsalomon@nyu.edu> | 2019-04-30 20:38:53 -0400 |
commit | cff2554231b5dce228795acaf02b5a69cb7d362e (patch) | |
tree | 420fbb10953da0c98fabf6a67c8b9e4d88e374fc | |
parent | 9f489eefc277651e4dc70ec7d7c06b4396835175 (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.
-rwxr-xr-x | bin/mailsync | 7 |
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 |