Comments (4)
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. zef
would not work yet) the message still gives enough information to tell if you are running what you really want.
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
from zef.
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.
from zef.
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.
from zef.
I appreciate the explanations, but FWIW this is overcomplicating things: IMHO Rakudo could still just show zef
and nobody would really complain about any ambiguities due to presence of more than just one zef
in the PATH, this is not what's really expected from the help message.
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!
from zef.
Related Issues (20)
- fetch 'Usage' message incorrectly suggests arguments are optional HOT 2
- Feature request: `zef config` subcommands for debugging HOT 1
- Confusing message for command 'upgrade' HOT 4
- Feature request: Have option "--serial" be the default for commands "install" and "upgrade" HOT 2
- zef install treated "v6" as a dependency HOT 1
- No such method 'remove-artifacts' for invocant of type HOT 4
- Can't `zef install` YAMLish on Windows 10 HOT 6
- Error: Type check failed in binding to parameter '$repo-id'; HOT 1
- Use of uninitialized value @short-names-to-index HOT 4
- zef installs some module resources to /tmp/.zef which are missing on reboot HOT 5
- Add `--precomp` flag to zef HOT 1
- Use of uninitialized value @short-names-to-index in Zef::Repository::Ecosystems line 250 HOT 2
- zef install fails on a fresh (?) M1 macos brew install of rakudo star HOT 7
- zef can't find any distribution that has ":ver<*>" in its name HOT 2
- Error in dependency resolution HOT 7
- Digest vs Digest::MD5 (advice please) HOT 5
- zef may fail to install IO::String HOT 1
- Zef local test (zef test . --debug) doesn't check for valid pod HOT 5
- Shared library referenced in /tmp/.zef? Potential security issue. HOT 2
- configure /tmp/.zef directory for root / none root users HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zef.