]> git.madduck.net Git - etc/mutt.git/blobdiff - .config/mutt/list-mailboxes

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add siby alternate
[etc/mutt.git] / .config / mutt / list-mailboxes
index 497a253c5f5d638000bc33ba65c3547dc28be00b..d0bb5d5135c405e186f8e7c48a1337a4981f4e40 100755 (executable)
@@ -1,6 +1,15 @@
 #!/bin/sh
 
 #!/bin/sh
 
+if [ -f $VARDIR/offlineimap/mailboxes ]; then
+  sed 1d $VARDIR/offlineimap/mailboxes
+fi
+
 find "$1/" -type d -name cur -printf '%h\n' | \
   sed -e "s,^$1/,=,g" -e "s,^$1\$,$2," | \
 find "$1/" -type d -name cur -printf '%h\n' | \
   sed -e "s,^$1/,=,g" -e "s,^$1\$,$2," | \
-  egrep -v '^=(sp(ool|am)|discard|retrain(/(sp|h)am)?)$' | \
-  sort | xargs echo mailboxes
+  egrep -v '^=(sp(ool|am)|discard|retrain(/(sp|h)am)?)$' | sort | \
+while read mailbox; do
+
+  ! grep -q "^mailboxes ${mailbox}\$" $VARDIR/offlineimap/mailboxes || continue
+  echo "mailboxes $mailbox"
+
+done