mutt-wizard

A wizard that autocreates an offline email setup for (neo)mutt with isync/mbsync
Log | Files | Refs | README | LICENSE

commit 40e565e7fe7cf095dba69c7d8c1de2b126aa0c7d
parent b33095c760cff94568fb3f664d98e9b642090665
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Fri, 19 Apr 2019 22:52:31 -0400

minor shellcheck

Diffstat:
Mmw | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mw b/mw @@ -216,14 +216,14 @@ finalize() { \ grep -i -m 1 spam "$tmpdir/title_boxes" | formatShortcut S spam "$title" grep -i -m 1 junk "$tmpdir/title_boxes" | formatShortcut j junk "$title" grep -i -m 1 archive "$tmpdir/title_boxes" | formatShortcut a archive "$title" - [ "$accounttype" = "offline" ] && printf "All done.\\n\033[33mYou should now be able to run \`\033[32mmbsync $title\033[33m\` to begin to download your mail.\033[0m\\n" + [ "$accounttype" = "offline" ] && printf "All done.\\n\033[33mYou should now be able to run \`\033[32mmbsync %s\033[33m\` to begin to download your mail.\033[0m\\n" "$title" } confirm() { printf "Are you \033[31;1mreally\033[0m sure you want to %s?\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "y\(es\)*" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1 printf "Are you really, really sure you want to %s?\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "y\(es\)*" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1 return 0 ;} -pick() { numbered="$(ls $accdir/*muttrc | sed "s/.*\///;s/\..*//" | nl)" +pick() { numbered="$(find "$accdir" -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | nl)" [ "$(echo "$numbered" | wc -w)" = 0 ] && printf "No accounts to choose from.\\n" && return 1 printf "Select an accounts to %s:\\n" "$1" echo "$numbered" @@ -264,7 +264,7 @@ choosecron() { ! pgrep crond >/dev/null && echo "No cron manager running. Instal cont() { printf "Press Enter to continue.\\n" stty -echo - read -r null + read -r stty echo ; } addtype() { ! command -v mbsync >/dev/null && printf "You must have the \`mbsync\` command to add an account.\\nIt syncs mail and detects remote mailboxes.\\nYou can typically get it by installing \`isync\`.\\n" && return 1