commit 542ae0081ff3f127689caa0b98fa3543532ce0f3 parent 8a5ee90a1c481c908e95e887f26051407fe58903 Author: Luke Smith <luke@lukesmith.xyz> Date: Sat, 16 Feb 2019 13:14:14 -0500 remove msmtprc entry on del Diffstat:
M | mutt-wizard.sh | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mutt-wizard.sh b/mutt-wizard.sh @@ -128,7 +128,9 @@ removeAccount() { sed -ie " rm "$muttdir"/accounts/$1.muttrc rm "$muttdir"/credentials/$1.gpg rm -rf "$muttdir"/accounts/$1 - sed -i "/$1.muttrc/d" "$muttdir"/personal.muttrc ;} + sed -i "/$1.muttrc/d" "$muttdir"/personal.muttrc + # Delete from the line matching the account name, until the next account or empty line + sed -i "/account $1/,/^\(\s*$\|account\)/d" ~/.msmtprc ;} manual() { \ imap=$( dialog --inputbox "Insert the IMAP server for your email provider (excluding the port number)" 10 60 3>&1 1>&2 2>&3 3>&- )