-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Cosmetic: ugly program name in auto-generated help message #108
Comments
This is an issue with Rakudo itself and will affect all perl6 scripts that are installed and precompiled. The only way to fix this outside of Rakudo would be to implement an entire GetOpts library in the zef distribution. |
FWIW this occurs because Rakudo installs a wrapper to invoke the actual script that gets installed, so an installed bin/zef not actually the original script and simply invokes the script (which is saved in the hash file shown). So why can't Rakudo just show 'zef'? This is due to the possibility of shadowed commands, I.e. you may have two directories in PATH that each have a bin/zef. Only the first bin/zef could honestly be represented as 'zef', because otherwise the help command would be lying about how to invoke the script it's a part of. Combined with the "wrapper" scripts (of the same name) that get installed you can see why there is not an easy solution. zef --help doesn't use Rakudo to auto generate its help message - if it did it would look the same. Unfortunately there is no way to override the current help message that occurs when inputting bad arguments. |
I appreciate the explanations, but FWIW this is overcomplicating things: IMHO Rakudo could still just show Or, to put it otherwise, IMO breaking the common case while trying to address a vanishingly rare scenario is not worth it. This being said, I'm closing this as it's not really a zef issue in any case. Thanks again for taking time to write the replies! |
One of the other options that was discussed was showing the prefix directory stuff once towards the start or end of the help message (possibly only verbose help), and showing only the script name everywhere else in the help. This is nice because when you invoke a script without it being installed (i.e. If anyone is inclined to implement this you can find the code here, and the part that handle the file path / invocation name shown is here |
Running
zef
without arguments orzef --help
produces a perfectly nice help message, however making a mistake on zef command line results in another (auto-generated by Perl6, I think?) error message which is not as good but would still be useful if it didn't use a very ugly name with a hash in it instead of justzef
, i.e.:This issue is about
resources/3DD33...
, it would be really better to havebin/zef
instead of it here.The text was updated successfully, but these errors were encountered: