summaryrefslogtreecommitdiff
path: root/mw
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-04-20 17:55:15 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-04-20 17:55:15 -0400
commitc8e10a92013198189b04e99ebfe15f1153d6441d (patch)
tree4b98114c818bbbe2b33b136329c9b37d2d31ee65 /mw
parent4557032712bb8739258d2b6d557f594359ecc98d (diff)
accdir variable used
Diffstat (limited to 'mw')
-rwxr-xr-xmw10
1 files changed, 5 insertions, 5 deletions
diff --git a/mw b/mw
index 3713e06..8462f94 100755
--- a/mw
+++ b/mw
@@ -175,7 +175,7 @@ getpass() { pass rm -f "mutt-wizard-$title" 2>/dev/null ; pass insert "mutt-wiza
formatShortcut() { \
while read -r data; do { echo "macro index,pager g$1 \"<change-folder>$data<enter>\" \"go to $2\" # autogenerated"
echo "macro index,pager M$1 \"<save-message>$data<enter>\" \"move mail to $2\" # autogenerated"
- echo "macro index,pager C$1 \"<copy-message>$data<enter>\" \"copy mail to $2\" # autogenerated"; } >> "$muttdir/accounts/$3.muttrc"
+ echo "macro index,pager C$1 \"<copy-message>$data<enter>\" \"copy mail to $2\" # autogenerated"; } >> "$accdir/$3.muttrc"
done ;}
trysync() { ! ping -q -c 1 1.1.1.1 > /dev/null && printf "No internet connection detected.\\nTry rerunning \`mbsync %s\` manually when connection is established, then select the option to detect mailboxes and finalize installation.\\n" "$title" && return 1
@@ -205,11 +205,11 @@ finalize() { \
record=$(grep -i -m 1 "$tmpdir/title_boxes" -e sent | sed -e 's/=/+/g')
postponed=$(grep -i -m 1 "$tmpdir/title_boxes" -e draft | sed -e 's/=/+/g')
trash=$(grep -i -m 1 "$tmpdir/title_boxes" -e trash | sed -e 's/=/+/g')
- sed -i "/^mailboxes\|^set record\|^set postponed\|^set trash\|^set spoolfile/d" "$muttdir/accounts/$title.muttrc"
- { echo "set spoolfile = \"$spoolfile\""; echo "set record = \"$record\""; echo "set postponed = \"$postponed\""; echo "set trash = \"$trash\""; } >> "$muttdir/accounts/$title.muttrc"
- echo mailboxes "$oneline" >> "$muttdir/accounts/$title.muttrc"
+ sed -i "/^mailboxes\|^set record\|^set postponed\|^set trash\|^set spoolfile/d" "$accdir/$title.muttrc"
+ { echo "set spoolfile = \"$spoolfile\""; echo "set record = \"$record\""; echo "set postponed = \"$postponed\""; echo "set trash = \"$trash\""; } >> "$accdir/$title.muttrc"
+ echo mailboxes "$oneline" >> "$accdir/$title.muttrc"
printf "Setting up your keyboard shortcuts for jumping between mailboxes...\\n"
- sed -i "/# autogenerated/d" "$muttdir/accounts/$title.muttrc"
+ sed -i "/# autogenerated/d" "$accdir/$title.muttrc"
grep -i -m 1 inbox "$tmpdir/title_boxes" | formatShortcut i inbox "$title"
grep -i -m 1 sent "$tmpdir/title_boxes" | formatShortcut s sent "$title"
grep -i -m 1 draft "$tmpdir/title_boxes" | formatShortcut d drafts "$title"