3 ms·
> You can see there's a big competing pattern of having multiple binaries with the same prefix One could create an entire ecology of tools that operates as a s
by kmstout 6y ago
> You can see there's a big competing pattern of having multiple binaries with the same prefix
One could create an entire ecology of tools that operates as a sort of compromise: Have a family of separate programs named with a common prefix (e.g., foo-), and a dispatch program (foo) that, when run like
foo bar options
dispatches to foo-bar with the options, and when run like
foo [-h|--help]
prints a help message and then lists every foo- program on the PATH, incorporating the whatis output where available. (That last bit requires man pages to work, but you can't very well tell people to read a manual that doesn't exist.)
I have used this strategy at work with considerable success.
- thewakalix 6y agoI believe Cargo (of the Rust ecosystem) works this way. One benefit is that it can be extended by the community (for example, cargo-update).