Something I've often found is that people don't know when to use - vs -- for options when both alternatives exist and, more often than not, just use - everywhere. Back when I was a lad the rule-of-thumb I was taught was that you use - when tying command directly into the shell, in order to minimise the amount of typing you do, and use -- in scripts since they'll be read far more than they'll be written so clarity is more important.
I would like to propose adding a Tip to the second lesson where they are introduced that says something like:
When to use -- or -
When to use the long options or the short options depends on what you are doing at the time. The general good practice rule-of-thumb is:
Use the single character options following - when typing commands to be run immediately in order to minimise the amount of typing you do.
Use the longer options following -- when using the commands inside a script file. Script files are usually read far more frequently than they are added to so clarity is more important than saving key strokes.
Something I've often found is that people don't know when to use
-
vs--
for options when both alternatives exist and, more often than not, just use-
everywhere. Back when I was a lad the rule-of-thumb I was taught was that you use-
when tying command directly into the shell, in order to minimise the amount of typing you do, and use--
in scripts since they'll be read far more than they'll be written so clarity is more important.I would like to propose adding a Tip to the second lesson where they are introduced that says something like: