mw sync can take arg, otherwise sync all

This commit is contained in:
Luke Smith 2020-08-27 16:54:06 -04:00
parent aece24c7dd
commit 3821323572
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252

4
bin/mw
View File

@ -289,7 +289,7 @@ purge() { confirm "delete all account data" || exit
sed -ibu "/\# mw-autogenerated/d" "$muttrc" ; rm -f "$muttrc"bu sed -ibu "/\# mw-autogenerated/d" "$muttrc" ; rm -f "$muttrc"bu
} }
syncwrapper() { mbsync -a & syncwrapper() { mbsync "${1:--a}" &
( kill -46 "$(pidof "${STATUSBAR:-dwmblocks}")" >/dev/null 2>&1 ) 2>/dev/null ( kill -46 "$(pidof "${STATUSBAR:-dwmblocks}")" >/dev/null 2>&1 ) 2>/dev/null
wait wait
( kill -46 "$(pidof "${STATUSBAR:-dwmblocks}")" >/dev/null 2>&1 ) 2>/dev/null ( kill -46 "$(pidof "${STATUSBAR:-dwmblocks}")" >/dev/null 2>&1 ) 2>/dev/null
@ -322,7 +322,7 @@ case "$1" in
add) asktype && askinfo && tryconnect && finalize || delete ;; add) asktype && askinfo && tryconnect && finalize || delete ;;
pass) pick "change the password of" && getpass ;; pass) pick "change the password of" && getpass ;;
delete) pick delete && confirm "delete the \`$title\` profile" && delete ;; delete) pick delete && confirm "delete the \`$title\` profile" && delete ;;
sync) syncwrapper ;; sync) syncwrapper $2 ;;
purge) purge ;; purge) purge ;;
*) cat << EOF *) cat << EOF
mw: mutt-wizard, auto-configure email accounts for mutt mw: mutt-wizard, auto-configure email accounts for mutt