-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Issue 17090 - dmd -transition=? needs quoting => make it -transition=help
#9205
Conversation
…ld list options by default
|
Thanks for your pull request, @wilzbach! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#9205" |
|
I think part of the reason for the |
| { | ||
| return strcmp(p, "?") == 0 || | ||
| strcmp(p, "h") == 0 || | ||
| strcmp(p, "help") == 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, with this function I'm all in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, just accept all three. I know I try them in sequence (for random utilities) until one of them works.
src/dmd/cli.d
Outdated
| @@ -471,7 +471,7 @@ dmd -cov -unittest myprog.d | |||
| $(DT native)$(DD use the architecture the compiler is running on) | |||
| )`, | |||
| ), | |||
| Option("mcpu=?", | |||
| Option("mcpu=[h|help]", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not [?|h|help] ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps because ? needs to be quoted on some shells, but some users won't immediately figure out that they need to use -mcpu='?'. So instead, the suggestion would become ['?'|h|help].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I wanted to phase out ? as it's problematic on many shells. Anyhow I now changed it to: mcpu=h|help|?, s.t. it's still mentioned but not as first choice.
There's still a lot more that could be done:
but this is a small start. I changed the
?as default in the docs as its very problematic in most shells. I added a test to ensure that it will continue to be accepted though.