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
take single letter CLI options with one leading hyphen, such as -lwc
#18
Comments
|
As far as I remember, CLI option parsing has many problems and this is just one of them. Somebody knew more about this topic… @Leont ? Also, there may be some open PRs here https://github.com/rakudo/rakudo/pulls I'm not sure if we should be fixing these things one by one or if we need a full overhaul. Doing it all at once will perhaps give us a way to version it nicely. |
|
This doesn't fit at all into the existing argument parser. If you want that kind of interface I would recommend my Getopt::Long module :-) |
|
@Leont yes, but is there anything that prevents us from swapping the current argument parser with code from Getopt::Long? |
While Getopt::Long is a drop-in replacement from a perl POV, it is not from an external point of view. It changes the command-line interface in several ways (including the one described in this ticket). It's not the kind of change one drops upon others without warning. That said, making such a thing conditional on |
That can be handled by adding a
I don't think all magic is required here.
That sounds like something useful for programmers but not for end-users. In my experience,, it's actually quite hard to figure out what's going on that way for the latter. Take for example any of these: All of these could have had error messages contains essential information for the end-user like "No command given", "install needs a module". Some of these don't really to be errors anyway but need zef to work around the gotchas (e.g. |
I created rakudo/rakudo#2874 for this. |
|
Before this issue can be closed, we will need spectests! :-) |
when wanting to implement some clones of common unix utilities i came across the fact that if you want to take single character options they need to be run as
> ./wc.p6 -l -w -cbut a common way of doing that in unix tools is
> wc -lwci think this would fit well as another option for
%*SUB-MAIN-OPTSThe text was updated successfully, but these errors were encountered: