Created
March 23, 2018 19:08
-
-
Save zanshin/f54ad65e1755eda5d45d597953771864 to your computer and use it in GitHub Desktop.
mailboxes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set folder=~/.mail | |
mailboxes +”foo” | |
# find sorts things in strange ways. for example: Lists will come after | |
# Lists/Atomic, here the printf prints the name of the folder we need, and the | |
# folder's depth. Numeric sort on the depth first, then the name, then do some | |
# cleanup (escape any spaces in the directory name and then print all the | |
# mailboxes on 1 line) | |
mailboxes `find ~/.mail/foo/ -type d -name cur -printf '%h\t%d\n'| sort -n | tr ' ' '\\ ' | awk -F'\t' '{ ORS=" "}{ print $1 }'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment