Double dash options? - Unix

This is a discussion on Double dash options? - Unix ; Lately I've seen more and more programs using two dashes for arguments, i.e.: progname --option1 --option2 What's the reason for this? Why is one dash not sufficient? -- John Gordon A is for Amy, who fell down the stairs gordon@panix.com ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Double dash options?

  1. Double dash options?

    Lately I've seen more and more programs using two dashes for arguments,
    i.e.:

    progname --option1 --option2

    What's the reason for this? Why is one dash not sufficient?

    --
    John Gordon A is for Amy, who fell down the stairs
    gordon@panix.com B is for Basil, assaulted by bears
    -- Edward Gorey, "The Gashlycrumb Tinies"


  2. Re: Double dash options?

    Begin
    On Tue, 16 Sep 2008 16:39:13 +0000 (UTC), John Gordon wrote:
    > Lately I've seen more and more programs using two dashes for arguments,
    > i.e.:
    >
    > progname --option1 --option2
    >
    > What's the reason for this? Why is one dash not sufficient?


    The gnu crowd claim that long options are much better because you don't
    have to remember what letter you need, plus giving you many more options.

    The downside is that now you'll have to remember the exact spelling of
    the option. For a hypothetical debugtool where you used to use

    debugtool -S

    you now type

    debugtool --syscall-trace=yes

    or was it

    debugtool --syscall_tracing=1

    or maybe

    debugtool --trace_syscalls=yes

    or, uhm,

    debugtool --trace-syscalls=on

    or possibly even

    debugtool --trace=syscalls

    or what was it again?


    If you get the impression I don't think they're the essence of a good
    idea, you'd be correct. Still, they do prove popular with a certain crowd
    of programmers. AFAIK, it originated at the fine folks at recursive
    acronyms'r'us and as such has been with us for, oh, a decade or so.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  3. Re: Double dash options?

    John Gordon writes:
    >Lately I've seen more and more programs using two dashes for arguments,
    >i.e.:


    > progname --option1 --option2


    >What's the reason for this? Why is one dash not sufficient?


    Only lately? The GNU people have had the -- options for quite some years.

    Single dashes are reserved for single letters. Double dashes have
    words that you have to read the man page to remember most of the time.


+ Reply to Thread