-
-
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
Provide callable versions of command line functions #241
Comments
Please someone post to the stackoverflow question that the simple answer is: don't. The correct solution in the mentioned case is to give the module's user a chance to add some configuration, e.g. from /etc/yourmodule/config.json or ~/.config/yourmodule/config.json or better even, just pass in additional config values to a constructor. |
In the next refactor many things will be available functionally through some sort of A utility function to return structured data would be ideal, but since you're already parsing the output you can instead do the following ( to avoid
|
Thanks!
|
Are there any plans to have something like this in the current Zef::Utils |
@JJ not likely. The functionality and extension may become possible after some work I’m doing to make |
Command line functions are mapped to a
multi MAIN
inZef::CLI
. In some cases, they provide interesting functionality, and I'm talking aboutlocate
, for instance.Context
In this stackoverflow question, they want to locate something that has been installed. I tried to reproduce the functionality of the code in
Zef::CLI
and failed, due to usage of global variables and somesuch. I finally opted for running zef externally and processing output.Expected Behavior
It would be nice to have something like
Actual Behavior
You need to do
zef locate file
The text was updated successfully, but these errors were encountered: