diff --git a/autoconf/mutt_profile b/autoconf/mutt_profile index a96c93a..b288a6a 100644 --- a/autoconf/mutt_profile +++ b/autoconf/mutt_profile @@ -18,4 +18,5 @@ set ssl_force_tls = yes bind index,pager gg noop bind index,pager g noop bind index gg first-entry +bind index,pager noop unmailboxes * diff --git a/mutt-wizard.sh b/mutt-wizard.sh index 4b8a075..3ca56b4 100755 --- a/mutt-wizard.sh +++ b/mutt-wizard.sh @@ -64,6 +64,11 @@ formatShortcut() { \ echo "macro index,pager g$1 \"$data\" \"Go to $2.\"" >> "$muttdir"/accounts/$3.muttrc done ;} +formatMoveEmailShortcut() { \ + while read data; do + echo "macro index,pager $1 \"$data\" \"Save message to $2.\"" >> "$muttdir"/accounts/$3.muttrc + done ;} + gen_delim() { \ delim="=" for i in `seq $(( $1 - 1 ))` @@ -87,7 +92,9 @@ detectMailboxes() { \ grep -i /tmp/$1_boxes -e trash | sed 1q | formatShortcut t trash $1 grep -i /tmp/$1_boxes -e spam | sed 1q | formatShortcut S spam $1 grep -i /tmp/$1_boxes -e junk | sed 1q | formatShortcut j junk $1 - grep -i /tmp/$1_boxes -e archive | sed 1q | formatShortcut a archive $1 + archive_box=$(grep -i /tmp/$1_boxes -e archive | sed 1q) + echo $archive_box | formatShortcut a archive $1 + echo $archive_box | formatMoveEmailShortcut a archive $1 spoolfile=$(grep -i /tmp/$1_boxes -e inbox | sed -e 's/=/+/g' | sed 1q) record=$(grep -i /tmp/$1_boxes -e sent | sed -e 's/=/+/g' | sed 1q) postponed=$(grep -i /tmp/$1_boxes -e draft | sed -e 's/=/+/g' | sed 1q)