www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10611] New: Add -h as shorthand for --help

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10611

           Summary: Add -h as shorthand for --help
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: wyatt.epp gmail.com


--- Comment #0 from Wyatt <wyatt.epp gmail.com> 2013-07-11 08:22:27 PDT ---
Created an attachment (id=1232)
Two lines changed.

Just a tiny usability tweak that makes my life a little less annoying when I
have to check the dmd options.

(Disclaimer, I haven't tested the attached patch quite yet.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 11 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10611


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc


--- Comment #1 from bearophile_hugs eml.cc 2013-07-11 08:28:32 PDT ---
What's the point of using --help with dmd?
If you want the help just call dmd with no switches:

dmd

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 11 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10611



--- Comment #2 from Wyatt <wyatt.epp gmail.com> 2013-07-11 09:09:07 PDT ---
(In reply to comment #1)
 What's the point of using --help with dmd?
 If you want the help just call dmd with no switches:
 
 dmd
Honestly? I had no idea that was the case. I certainly don't expect that behaviour, and I question whether many others would either. I realise that POSIX doesn't specify -h or --help (I might consider this an oversight on their part), but one or both are present in most utilities by convention, unlike printing help in the absence of arguments (which doesn't appear to have any consistency whatsoever). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 11 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10611



--- Comment #3 from bearophile_hugs eml.cc 2013-07-11 09:41:22 PDT ---
(In reply to comment #2)

 Honestly?  I had no idea that was the case.
So now do you want to keep this ER open? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 11 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10611



--- Comment #4 from Wyatt <wyatt.epp gmail.com> 2013-07-11 10:30:47 PDT ---
(In reply to comment #3)
 (In reply to comment #2)
 
 Honestly?  I had no idea that was the case.
So now do you want to keep this ER open?
I thought that was pretty clear. Regardless of what happens when you invoke dmd without arguments, this is still unexpected, and user expectation is foundational to usability. Educating one user doesn't propagate through them all. It's more useful to more users to follow sed and awk's example than to do what find does: wyatt Yue ~ $ find -h find: unknown predicate `-h' wyatt Yue ~ $ dmd -h Error: unrecognized switch '-h' Another possibility would be to simply print the help when the switch is unrecognised, but I dislike this option because it removes the inherent "spell checking" for switches that the current behaviour provides. e.g. wyatt Yue ~ $ dmd -O -unitest -inline foo.d Error: unrecognized switch '-unitest' wyatt Yue ~ $ dmd -O2 foo.d Error: unrecognized switch '-O2' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 11 2013