25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

23 satır
929 B

  1. #!/bin/sh
  2. muttdir="$HOME/.config/mutt/"
  3. find ~/.mail/$1 -maxdepth 1 -mindepth 1 -type d | sed -e "s/.*\///g;s/^/=/g" > /tmp/$1_boxes
  4. oneline=$(cat /tmp/$1_boxes | tr "\n" " ")
  5. sed -i "/^mailboxes/d" "$muttdir"accounts/$1.muttrc
  6. echo mailboxes $oneline >> "$muttdir"accounts/$1.muttrc
  7. formatShortcut() { \
  8. while read data; do
  9. echo "macro index,pager g$1 \"<change-folder>$data<enter>\" \"Go to $2.\"" >> "$muttdir"accounts/$3.muttrc
  10. done ;}
  11. sed -i "/^macro index,pager g/d" "$muttdir"accounts/$1.muttrc
  12. grep -vi /tmp/$1_boxes -e "trash\|drafts\|sent\|trash\|spam\|junk\|archive" | sort -n | sed 1q | formatShortcut i inbox $1
  13. grep -i /tmp/$1_boxes -e sent | formatShortcut s sent $1
  14. grep -i /tmp/$1_boxes -e trash | formatShortcut t trash $1
  15. grep -i /tmp/$1_boxes -e spam | formatShortcut S spam $1
  16. grep -i /tmp/$1_boxes -e draft | formatShortcut d drafts $1
  17. grep -i /tmp/$1_boxes -e archive | formatShortcut a archive $1