As far as I know here’s not much difference, in general, between the single-dash and double-dash ways of doing it when both ways are available.
There are some options which don’t have the single-dash form and there may be some that don’t have the double-dash form.
There may be some differences for some specific options but those differences should be documented for those specific options.
I’ve been using the single-dash versions almost exclusively and haven’t had any problems yet (except when I’ve used them wrong).
Note: Some double-dash options, for some commands, became subcommands in .NET 7 SDK, so it all gets a bit complicated once you ‘dive in’.
As for “—name” versus “—output” question, I can’t answer that as there may be some specific ‘under-the-hood’ details that I’m not aware of.
What I can say about it is that I have been using “-n” to automatically create the folder name for me without issue – I’ve never tried “-o” or “—output”.
Sorry for the short reply earlier. At least for me I am using the short hand notation when I am typing in the terminal. It is faster and more lean and I have probably looked at the documentation right before invoking the command. If there are long forms of the options and I have a need to use these commands in a script then I will put in the extra effort to use the long form. This helps me later when I am trying to figure out what my script is doing (might not need to read the documentation again). So that’s how I reason about short vs long forms. What do you guys think?
While I’ve not used dotnet commands in a script I can see where having the command in ‘long form’ would be useful.
I imagine it makes it easier to spot the options when there are lots of them; for example it’s probably easier to accidentally miss something short like “-d” than it would be to miss something like “–diagnostics”.
It’s also a kind of free (basic) documentation I guess.