sort -u the alias file so more than one of the exact same alias doesn't get added.

This commit is contained in:
Storm Dragon 2018-08-15 08:31:29 -04:00
parent ed8253a88c
commit 0a408847d1

View File

@ -427,7 +427,7 @@ new_contact()
[[ "$(yesno "$(gettext "This email address already exists in your contacts. Continue anyway?")")" != "Yes" ]] && exit 0
fi
echo "alias $contactAlias $contactName <$contactEmail>" >> "$muttHome/aliases"
sort "$muttHome/aliases" -o "$muttHome/aliases"
sort -u "$muttHome/aliases" -o "$muttHome/aliases"
msgbox "$contactName $(gettext "added to your address book")."
}