With Plugins
Introduce
MYZS has been a support module for a very long time ago, but the problem with module is it ship with core/builtin modules. We cannot hide or remove if user didn't use.
Plugins is born to resolve this problem. The plugin basically is a repository that contains multiple modules that will cache on local machine and loading by $MYZS_LOADING_MODULES
variable.
Currently, the plugin can be hosted on GitHub only, and the project will cloned via git ssh command. You can create as public or private repository via template project at myzs-plugins organization.
After creating your own plugin repo, you can import them via setting in the $MYZS_LOADING_PLUGINS
variable. The syntax is <user>/<repo>#<branch>
. This setting will download and setup plugin in local for you, then you need to add the module manually in $MYZS_LOADING_MODULES
variable with syntax is <plugin_name|builtin>#<module_folder>/<module_file_with_or_without_extersion>
.
Example
# plugin
export MYZS_LOADING_PLUGINS=(
"myzs-plugins/core#master"
"myzs-plugins/git#v1.0.1"
"kamontat/custom-plugin#develop"
)
# module
export MYZS_LOADING_MODULES=(
"builtin#app/myzs.sh"
"myzs-plugins/core#alias/shell.sh"
"kamontat/custom-plugin#app/test.sh"
)
Release notes
Version 5.0.0
- introduce a new plugin system
- introduce a new module system
- refactor all method to support the new syntax
- the progress bar will support 3 levels of color that is normal, warning, and danger
- support config progress bar message size via $MYZS_PG_FULLMESSAGE_LENGTH and $MYZS_PG_MESSAGE_KEY_LENGTH
- support disable some log level as $MYZS_LOG_LEVEL variable
- support disabled progress bar via .zshrc config
- improve log message for progress dump in small type
- reduce builtin module, and use a plugin instead
- module resolve will check all builtin and plugin files. It might cause a high load
myzs-download
now support upgrade myzs and myzs-plugin
Version 5.0.1
- fix disable progressbar should not disable loading time
- update document on root and helper
- update default $MYZS_SETTINGS_SETUP_FILES to only 1 file name ("myzs-setup")
- reduce default $MYZS_LOG_LEVEL to log only "error" and "warn"
- update default $MYZS_PG_SHOW_PERF to false
- increase default $MYZS_PG_TIME_DANGER_THRESHOLD_MS from 500 to 600
- increase default $MYZS_PG_TIME_WARN_THRESHOLD_MS from 100 to 200
Version 5.0.2
- fix some typo in the log message and return value
- fix wrong module name in the log message when using skip
- fix unnecessary pass module path to module arguments
- remove changelog of version 4.0.0 - 4.5.2