Menu

#1 dash as arg value

closed
nobody
None
5
2004-12-08
2004-12-02
lukistrela
No

Dash as a value for a mandatory (Unlabeled) argument is
a good thing; I use it for file name argument to signify
that stdin should be used. Works fine.
Long option only is another good thing that also works
fine.
The two however do not work together. If only you
construct a long-only argument, you may even not use
it, but the dash stops working.

I don't consider this a bug, but resolution would be nice.

Overall - great code, I am using it in my cross-platform
project (same code on Linux and Windows) with no
trouble at all. Thanks!

Discussion

  • Mike Smoot

    Mike Smoot - 2004-12-08

    Logged In: YES
    user_id=27603

    Actually, this was a bug. With long options only, I was
    checking to see if the blank flag combined with '-'
    matched for the long option only Arg and it would. I've
    now added a check to make sure the flag is not blank
    before matching.

    The fix is now in cvs and I'll put a proper release out in
    a day or two.

    Good catch!

     
  • Mike Smoot

    Mike Smoot - 2004-12-08
    • status: open --> closed
     

Log in to post a comment.