In general, the implementation of how command-line arguments are interpreted is left completely at the discretion of the programmer.
That said, in many cases, the value of a "long" option (such as is introduced with
--option_name) is specified with an
= between the option name and the value (i.e.
--option_name=value), whereas for single-letter options it is more customary to separate the flag and value with a space, such as
-o value, or use no separation at all (as in
An example from the man-page of the GNU date utility:
display time described by STRING, not 'now'
like --date; once for each line of DATEFILE
As you can see, the value would be separated by a space from the option switch when using the "short" form (i.e.
-d), but by an
= when using the "long" form (i.e.
As pointed out by Stephen Kitt, the GNU coding standard recommends the use of
getopt_long to parse command-line options. The man-page of
A long option may take a parameter, of the form
So, a program using that function will accept both forms.