some identier exported; new file import-utils.go

This commit is contained in:
2024-06-06 05:31:35 +02:00
parent 8144122d2c
commit c100cf349d
17 changed files with 186 additions and 170 deletions
+4 -1
View File
@@ -11,6 +11,7 @@ const (
ControlLastResult = "last"
ControlBoolShortcut = "_bool_shortcut"
ControlImportPath = "_import_path"
ControlPluginPath = "_plugin_path"
)
// Other control variables
@@ -20,12 +21,14 @@ const (
// Initial values
const (
init_import_path = "~/.local/lib/go-pkg/expr:/usr/local/lib/go-pkg/expr:/usr/lib/go-pkg/expr"
init_import_path = "~/.local/lib/go-pkg/expr/sources:/usr/local/lib/go-pkg/expr/sources:/usr/lib/go-pkg/expr/sources"
init_plugin_path = "~/.local/lib/go-pkg/expr/plugins:/usr/local/lib/go-pkg/expr/plugins:/usr/lib/go-pkg/expr/plugins"
)
func initDefaultVars(ctx ExprContext) {
ctx.SetVar(ControlBoolShortcut, true)
ctx.SetVar(ControlImportPath, init_import_path)
ctx.SetVar(ControlPluginPath, init_plugin_path)
}
func enable(ctx ExprContext, name string) {