MacOS terminal "login: illegal option -- e" Whenever I open my terminal on my Mac I get this:

login: illegal option -- e
usage: login [-pq] [-h hostname] [username]
    login -f [-lpq] [-h hostname] [username [prog [arg ...]]]

[Process completed]


All of the fixes I've tried aren't working. I've tried deleting my preferences for the terminal, changing my shell, and deleting my terminal profile.

How can I resolve this error and get a working shell?
The problem is occurring because of an improper account name beginning with the dash ("-") character. So the solution is changing the name of the account via the steps given in this link: https://support.apple.com/en-us/HT201548

When you open the terminal an automatic login command like login -pf [account-name] is executed. Let's say the account name is "-gi". In this case the command will be login -pf -gi and naturally, the terminal will show the error illegal option -- g. Therefore you should change the account name properly.