Add in mblaze function for better mail managment.
This commit is contained in:
parent
e79bf4a82c
commit
7f3840ba26
@ -128,3 +128,30 @@ n () {
|
||||
upfast () {
|
||||
curl -F "file=@$(readlink -f $1)" "https://upfast.cronyakatsuki.xyz/"
|
||||
}
|
||||
|
||||
# mblaze functions
|
||||
|
||||
# Get new mail for current profile
|
||||
mnew () {
|
||||
maildir=$(grep "^Maildir:" $HOME/.mblaze/profile | cut -d: -f 2 | sed 's/ //g')
|
||||
profile=$(basename $maildir)
|
||||
if [ "$profile" = "local" ]; then
|
||||
mlist -s "$maildir"| msort -dr | mseq -S
|
||||
else
|
||||
mbsync -V $profile
|
||||
mlist -s "$maildir"/INBOX | msort -dr | mseq -S
|
||||
fi
|
||||
}
|
||||
|
||||
# Get full mail for current profile including threads
|
||||
mall () {
|
||||
maildir=$(grep "^Maildir:" $HOME/.mblaze/profile | cut -d: -f 2 | sed 's/ //g')
|
||||
sent=$(grep "^Outbox:" $HOME/.mblaze/profile | cut -d: -f 2 | sed 's/ //g')
|
||||
profile=$(basename $maildir)
|
||||
if [ "$profile" = "local" ]; then
|
||||
mlist "$maildir" | mthread -r -S "$maildir" | mseq -S
|
||||
else
|
||||
mbsync -V $profile
|
||||
mlist "$maildir"/INBOX | mthread -r -S "$sent" | mseq -S
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user