.NET Core, and several javascript libraries seem to now use two hyphens for each command line parameter.
Why is this happening now all of a sudden?
Does it have any (historic) meaning?
Why not use just a single hyphen? (what convention are we aligning to? xNix?)
From What's the difference betwen the single dash and double dash flags on shell commands? (ServerFault)
A single hyphen can be followed by multiple single-character flags. A double hyphen prefixes a single, multicharacter option.
Consider this example:
tar -czfIn this example,-czfspecifies three single-character flags:c,z, andf.Now consider another example:
tar --excludeIn this case,--excludespecifies a single, multicharacter option named exclude. The double hyphen disambiguates the command-line argument, ensuring that tar interprets it as exclude rather than a combination ofe,x,c,l,u,d, ande
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With