Documentation
¶
Overview ¶
Package config handles loading and parsing the memsh configuration file (~/.memsh/config.toml) and converting the configuration into shell.Option slices for use with shell.New().
A missing config file is not an error - sensible defaults are returned.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildShellOpts ¶
BuildShellOpts converts the loaded config into shell options.
Types ¶
type Config ¶
type Config struct {
Shell ShellConfig `toml:"shell"`
Plugins PluginsConfig `toml:"plugins"`
}
Config is the structure of ~/.memsh/config.toml.
type PluginsConfig ¶
type PluginsConfig struct {
// WASM is an allowlist of WASM plugin names to load from ~/.memsh/plugins/.
// When empty all discovered .wasm files are loaded.
// Example: wasm = ["python", "ruby"]
WASM []string `toml:"wasm"`
// Disable is a list of plugin names (native or WASM) to exclude.
// Example: disable = ["wc"]
Disable []string `toml:"disable"`
}
PluginsConfig controls which plugins are loaded.
type ShellConfig ¶
type ShellConfig struct {
// WASM enables or disables the wazero WASM plugin runtime.
// Set to false to skip all WASM plugin loading (faster startup).
// Default: true.
WASM bool `toml:"wasm"`
}
ShellConfig controls core shell behaviour.
Click to show internal directories.
Click to hide internal directories.