From 40e565e7fe7cf095dba69c7d8c1de2b126aa0c7d Mon Sep 17 00:00:00 2001
From: Luke Smith <luke@lukesmith.xyz>
Date: Fri, 19 Apr 2019 22:52:31 -0400
Subject: minor shellcheck

---
 mw | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'mw')

diff --git a/mw b/mw
index b96ca37..01a6565 100755
--- 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
-- 
cgit v1.2.3