When you execute a command with options, do you use short or long option? And when you write a script, do you use short or long option?

Here is an example of a bash script:

set -eE

What is the difference between e and E? Error? Echo? Eject? Exit? Which one is what?

What if we wrote it as:

set -o errexit -o errtrace

More descriptive, yes. Think of someone other than you reading it, someone who may not be as experienced as you are or new to that tech. A person won’t have to reference another manual to deciper your script. And even if they have to lookup, they have to search specific thing and not what is -e in bash script

Yes it may get verbose. One can also argue that people can lookup and learn. You will have to decided on what to use.

However, I have come to an opinion that if I am exectuing a command, use short options. But if I am scripting, and someone else have to read that code, use long options.

Code is for humans, Computers are honey badgers.