summaryrefslogtreecommitdiff
path: root/bin/mw
diff options
context:
space:
mode:
authorAisha Tammy <floss@bsd.ac>2021-05-15 22:16:15 -0400
committerAisha Tammy <floss@bsd.ac>2021-05-16 15:57:00 -0400
commit2cb2fa03452cb99537a1751961574a0b6d3253e0 (patch)
treeb91de7d97b509f3b315286d6e05f7b51e7d28927 /bin/mw
parent80aee073122c63d1b570dc32e4490909ff15753b (diff)
allow dynamically loading available mailboxes
this way if a folder is added or deleted in the remote location, and gets deleted after sync, it is reflected in the next opening Signed-off-by: Aisha Tammy <floss@bsd.ac>
Diffstat (limited to 'bin/mw')
-rwxr-xr-xbin/mw2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mw b/bin/mw
index 54af276..ebd0fdb 100755
--- a/bin/mw
+++ b/bin/mw
@@ -227,7 +227,7 @@ getboxes() { if [ -n "${force+x}" ] ; then
fi
[ "$type" = "pop" ] && mailboxes="INBOX"
getaccounts; for x in $(seq 1 9); do echo "$accounts" | grep -q "^$x:" || { export idnum="$x"; break ;}; done
- toappend="mailboxes $(echo "$mailboxes" | sed "s/^/\"=/;s/$/\"/" | paste -sd ' ' - )"
+ toappend="mailboxes \`mdir=$maildir/$fulladdr/; find \$mdir -type d -name cur | sort | sed -e 's:/cur\$:\":' -e \"s:\$mdir:\\\"=:\" | tr '\\\n' ' '\`"
for x in $mailboxes; do
case "$x" in
*[Ss][Ee][Nn][Tt]*) setBox record "$x"; formatShortcut s sent "$x" ;;