You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 line
466 B

  1. #!/bin/sh
  2. muttdir="$HOME/Repos/email-mutt-offline/"
  3. # This script will remove an account from ~/.offlineimaprc and the
  4. # designated location in ~/.config/mutt/accounts.
  5. # Feed the script the title of the account.
  6. title=$1
  7. removeAccount() { sed -ie "
  8. /Account $title]/,/Account/{//!d}
  9. /Account $title]/d
  10. s/ $title\(,\|$\)//g
  11. s/=$title\(,\|$\)/=/g
  12. s/,$//g
  13. " ~/.offlineimaprc
  14. rm "$muttdir"accounts/$title.muttrc
  15. echo $title deleted. ;}
  16. removeAccount $title