summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-04-26 20:56:50 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-04-26 20:56:50 -0400
commitc2247a218857523509436dab70c0b911bbaf3725 (patch)
tree216faecf15d7c858166daef502f842bf0cd5da8c
parentb49e7eb7576da63099db4d545f69131925d6abdc (diff)
maxmessages option
-rwxr-xr-xbin/mw3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/mw b/bin/mw
index cbaaeaf..6f3cd95 100755
--- a/bin/mw
+++ b/bin/mw
@@ -58,6 +58,7 @@ Slave :$title-local:
Patterns * !\"[Gmail]/All Mail\"
Create Both
SyncState *
+MaxMessages $maxmes
# End profile
"
@@ -155,6 +156,8 @@ EOF
read -r login
printf "\033[0m"
[ -z "$login" ] && login="$fulladdr"
+ [ "$accounttype" = "offline" ] && printf "If you want to limit the number of messages kept offline to a number, enter that number below. If you do not want to limit your mail and would like \`mbsync\` to sync all mail, press enter without typing a number.\\n\t" && read -r maxmes
+ echo "$maxmes" | grep "[1-9]" >/dev/null || maxmes="0"
getpass
getprofiles
mkdir -p "$muttdir" "$accdir" "$cachedir/$title/bodies" "$HOME/.config/msmtp"