123456789101112131415161718192021222324252627 |
- #include <lub/ini.h>
- #include <lub/string.h>
- #include "private.h"
- CLISH_PLUGIN_INIT
- {
- lub_ini_t *ini;
- char *conf = clish_plugin__get_conf(plugin);
- if (conf) {
- ini = lub_ini_new();
- lub_ini_parse_str(ini, conf);
- scripts_path =
- lub_string_dup(lub_ini_find(ini, LUA_SCRIPTS_DIR));
- lub_ini_free(ini);
- }
- if(clish_plugin_init_lua(clish_shell))
- return (-1);
- clish_plugin__set_name(plugin, LUA_PLUGIN_NAME);
- clish_plugin_add_sym(plugin, clish_plugin_lua_action, "lua");
- return 0;
- }
|