summaryrefslogtreecommitdiff
path: root/bin/mw
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-02-09 07:49:12 -0500
committerLuke Smith <luke@lukesmith.xyz>2020-02-09 07:49:12 -0500
commit9b511f42f74633cd15240a1561c00b28ba8b8fdc (patch)
tree77cc487586b9698a0cf04cd9559921014ebec72b /bin/mw
parent9ec671a128565c11c43ce511bd56024de325781b (diff)
find mailboxes recursively
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 568fef0..0e39046 100755
--- a/bin/mw
+++ b/bin/mw
@@ -230,7 +230,7 @@ tryconnect() { mkdir -p "$maildir/$title"
fi ;}
finalize() { \
- boxes="$(find "$maildir/$title/" -mindepth 1 -maxdepth 1 | sed "s/\ /\\\ /g;s/^.*\//=/")"
+ boxes="$(find "$maildir/$title/" -mindepth 1 -type d | sed "s/\ /\\\ /g;s/^.*\//=/;/=\(cur\|new\|tmp\)$/d")"
[ -z "$boxes" ] && printf "\033[31mNo local mailboxes have been detected for %s.\033[0m\\nThis means that mbsync has not been successfully run.\\nRun mbsync, and if it has an error, be sure to check your password and server settings manually if needbe.\\n" "$title" && return
printf "Setting default mailboxes for your Inbox, Sent, Drafts and Trash in mutt...\\n"
spoolfile=$(echo "$boxes" | grep -i -m 1 inbox | sed 's/=/+/g')